Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc repair diskless startup: "netstart" needs "sysctl" and "...



details:   https://anonhg.NetBSD.org/src/rev/d3b82b4a5081
branches:  trunk
changeset: 474464:d3b82b4a5081
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Jul 07 21:24:56 1999 +0000

description:
repair diskless startup: "netstart" needs "sysctl" and "awk" now, thus
"/usr" must be mounted. mount_critical_filesystems() didn't mount it,
even if listed in "critical_filesystems", if it is nfs.
Solution: introduce another rc.conf variable
"critical_filesystems_beforenet" which contains filesystems to be mounted
before "netstart".
Perhaps "netstart" should be split up, but this would make things even
more complex...

diffstat:

 etc/rc.conf |   5 +++--
 etc/rc.subr |  12 +++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r 900b15c40b12 -r d3b82b4a5081 etc/rc.conf
--- a/etc/rc.conf       Wed Jul 07 21:04:22 1999 +0000
+++ b/etc/rc.conf       Wed Jul 07 21:24:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.conf,v 1.54 1999/07/03 03:29:29 itojun Exp $
+#      $NetBSD: rc.conf,v 1.55 1999/07/07 21:24:56 drochner Exp $
 #
 # see rc.conf(5) for more information.
 
@@ -28,7 +28,8 @@
 domainname=""                          # if blank, use /etc/defaultdomain
 
 # Filesystems to mount early in boot-up
-critical_filesystems="/usr /var"
+critical_filesystems_beforenet="/usr /var" # "netstart" needs /usr
+critical_filesystems=""
 
 # Set this to YES if you have purposefully setup no swap partitions and
 # don't want to be warned about it
diff -r 900b15c40b12 -r d3b82b4a5081 etc/rc.subr
--- a/etc/rc.subr       Wed Jul 07 21:04:22 1999 +0000
+++ b/etc/rc.subr       Wed Jul 07 21:24:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.subr,v 1.9 1999/04/28 23:32:29 nathanw Exp $
+#      $NetBSD: rc.subr,v 1.10 1999/07/07 21:24:56 drochner Exp $
 # functions used by various rc scripts
 
 #
@@ -34,10 +34,12 @@
 #
 fstab=/etc/fstab
 mount_critical_filesystems() {
-       for fs in $critical_filesystems; do
-               if [ $1 = local ] && ! islocalfs $fs; then
-                       continue
-               fi
+       if [ $1 = local ]; then
+               _fslist=$critical_filesystems_beforenet
+       else
+               _fslist=$critical_filesystems
+       fi
+       for fs in $_fslist; do
                mount | (
                        ismounted=no
                        while read what _on on _type type; do



Home | Main Index | Thread Index | Old Index