jimp, mystery solved. Bottom-line:
The pfSense release 2.2 ufslabels.sh script fails to set $DEV properly
The ufslabels.sh f76cbd6 or later in git contains the fix
Manually labelling the swap partition will silently fail if you don't disable swap first (swapoff)
Thanks for all your help. In hindsight, I should have simply run the latest ufslabels.sh per your suggestion instead of simply inspecting the difference on github.
Best,
Bruce
Here are the supporting diag/debug details.
Command-logging of 2.2 ufslabels.sh script (the grep regular expression fails to return the swap device entry)
+ [ y = y ]
+ echo 'Disabling swap to apply label'
Disabling swap to apply label
+ /sbin/swapoff /dev/ada0s1b
+ echo 'Applying label to swap parition'
Applying label to swap parition
+ SWAPNUM=0
+ find_fs_device /dev/ada0s1b
+ unset DEV
+ /usr/bin/grep -e '[[:blank:]]/dev/ada0s1b[[:blank:]]' /etc/fstab
+ awk '{print $1;}'
+ DEV=''
+ DEV=''
+ [ '' != '' ]
+ echo 'Activating new fstab'
Activating new fstab
+ /bin/mv -f /etc/fstab /etc/fstab.old
+ /bin/mv -f /etc/fstab.tmp /etc/fstab
+ echo 'Re-enabling swap'
Re-enabling swap
+ /sbin/swapon -a
Command-logging of post-2.2 ufslabels.sh script (the grep regular expression properly returns the swap device).
+ echo 'Applying label to swap partition'
Applying label to swap partition
+ SWAPNUM=0
+ find_fs_device /dev/ada0s1b
+ unset DEV
+ /usr/bin/grep -e '[[:blank:]]*/dev/ada0s1b[[:blank:]]' /etc/fstab
+ awk '{print $1}'
+ DEV=/dev/ada0s1b
+ DEV=ada0s1b
+ [ ada0s1b != '' ]
+ SWAPDEV=ada0s1b
+ [ -n ada0s1b ]
+ echo 'Disabling swap ada0s1b to apply label'
Disabling swap ada0s1b to apply label
+ /sbin/swapoff /dev/ada0s1b
swapoff: /dev/ada0s1b: Invalid argument
+ /sbin/glabel label swap0 /dev/ada0s1b
+ SWAPNUM=1
+ echo 'Activating new fstab'
Activating new fstab
+ /bin/mv -f /etc/fstab /etc/fstab.old
+ /bin/mv -f /etc/fstab.tmp /etc/fstab
+ echo 'Re-enabling swap'
Re-enabling swap
+ /sbin/swapon -a
```****