Subject: bin/19703: Fatal typo/bug in -current's rc.subr mount_critical_filesystems
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kilbi@rad.rwth-aachen.de>
List: netbsd-bugs
Date: 01/05/2003 23:14:03
>Number:         19703
>Category:       bin
>Synopsis:       Fatal typo/bug in -current's rc.subr mount_critical_filesystems
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 05 14:15:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6L
>Organization:
>Environment:
All machines/platforms
>Description:
	Recent changes in rc.subr no longer mount critical filesystems!
>How-To-Repeat:
	...src/etc/postinstall fix rc your -current system and try to reboot!
>Fix:
	Many ways to correct the wrong logic, e. g.:

--- rc.subr     2003/01/05 11:40:29     1.54
+++ rc.subr     2003/01/05 22:09:41
@@ -91,13 +91,13 @@
        eval _fslist=\$critical_filesystems_${1}
        for _fs in $_fslist; do
                mount | (
-                       _ismounted=false
+                       _isnotmounted=true
                        while read what _on on _type type; do
                                if [ $on = $_fs ]; then
-                                       _ismounted=true
+                                       _isnotmounted=false
                                fi
                        done
-                       if $_ismounted; then
+                       if $_isnotmounted; then
                                mount $_fs >/dev/null 2>&1
                        fi
                )
>Release-Note:
>Audit-Trail:
>Unformatted: