[Bug 234686] sysutils/ec2-scripts: ec2_ephemeralswap always causes syntax error after FreeBSD 11

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 7 09:03:47 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234686

            Bug ID: 234686
           Summary: sysutils/ec2-scripts: ec2_ephemeralswap always causes
                    syntax error after FreeBSD 11
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: cperciva at FreeBSD.org
          Reporter: meta at FreeBSD.org
             Flags: maintainer-feedback?(cperciva at FreeBSD.org)
          Assignee: cperciva at FreeBSD.org

/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: checkyesno:
ec2_ephemeralswap_enable is set to YES.
/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: checkyesno:
ec2_ephemeralswap_enable is set to YES.
/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: run_rc_command: doit: :
/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: checkyesno:
ec2_ephemeralswap_enable is set to YES.
/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: run_rc_command: doit:
ec2_ephemeralswap_run
expr: syntax error
[: -lt: unexpected operator
/usr/local/etc/rc.d/ec2_ephemeralswap: DEBUG: EC2 ephemeral disks are
No ephemeral disks are available, so no swap space is being created.

This is caused around line 54 since after FreeBSD 11, SWZONESTRUCTS is always
empty. `vmstat -z` no longer returns SWAPMETA.

> SWZONESTRUCTS=`vmstat -z | tr -d , | awk '/^SWAPMETA/ { print $3 }'`

Probably the script should refer `swblk` instead. See also what's changed in
sys/vm/swap_pager.c between FreeBSD 10 and 11.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list