From abd3c20a030cbbf97c0188db3d2543da7fa296b2 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Tue, 17 Jun 2025 07:15:03 -0700 Subject: [PATCH] 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: b6e33f0cd536 --- libexec/rc/rc.d/mountcritlocal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/mountcritlocal b/libexec/rc/rc.d/mountcritlocal index 6dce672657f..5b80d4bfbb5 100755 --- a/libexec/rc/rc.d/mountcritlocal +++ b/libexec/rc/rc.d/mountcritlocal @@ -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