The branch main has been updated by cy:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=abd3c20a030cbbf97c0188db3d2543da7fa296b2

commit abd3c20a030cbbf97c0188db3d2543da7fa296b2
Author:     Cy Schubert <c...@freebsd.org>
AuthorDate: 2025-06-17 14:15:03 +0000
Commit:     Cy Schubert <c...@freebsd.org>
CommitDate: 2025-06-17 19:59:36 +0000

    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 6dce672657fc..5b80d4bfbb50 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

Reply via email to