mountcritlocal: Check only first byte for comment

Check for a "#" at the start of the line regardless whether it is its
own token or not. We avoid unecessary calls to rc.d/zpool.

Suggested by:	ivy
Fixes:		b6e33f0cd5
This commit is contained in:
Cy Schubert 2025-06-17 07:15:03 -07:00
parent fc77abfd1e
commit abd3c20a03

View file

@ -28,7 +28,7 @@ mountcritlocal_start()
esac
while read a b vfstype rest; do
if [ "$vfstype" = "zfs" -a "$a" != "#" ]; then
if [ "$vfstype" = "zfs" -a "${a#\#}" = "$a" ]; then
# zpool is needed for legacy ZFS
echo 'Importing zpools for legacy ZFS'
/etc/rc.d/zpool start