summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/initdiskless15
-rw-r--r--etc/rc.initdiskless15
2 files changed, 26 insertions, 4 deletions
diff --git a/etc/rc.d/initdiskless b/etc/rc.d/initdiskless
index 883a24d..7e238e6 100644
--- a/etc/rc.d/initdiskless
+++ b/etc/rc.d/initdiskless
@@ -81,8 +81,8 @@
# /conf/default/etc/{rc.conf,rc.local,fstab}. Your fstab should be sure
# to mount a /usr... typically an NFS readonly /usr.
#
-# NOTE! /etc/rc.d/diskless will create /var, /tmp, and /dev.
-# Those filesystems should not be specified in /conf. At least not yet.
+# NOTE! /var, /tmp, and /dev will be created elsewhere.
+# Those filesystems should not be specified in /conf.
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
[ ${dlv:=0} -eq 0 ] && [ ! -f /etc/diskless ] && exit 0
@@ -167,6 +167,17 @@ while [ $# -ge 1 ] ; do
shift
done
+# If /conf/diskless_remount exists, remount all of /conf. This allows
+# multiple roots to share the same conf files.
+if [ -d /conf -a -f /conf/diskless_remount ]; then
+ nfspt=`/bin/cat /conf/diskless_remount`
+ if [ `expr "$nfspt" : '\(.\)'` = "/" ]; then
+ nfspt="${nfsroot}${nfspt}"
+ fi
+ mount_nfs $nfspt /conf
+ chkerr $? "mount_nfs $nfspt /conf"
+fi
+
# Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca},
# and /conf/${bootp_ipa}. For each subdirectory found within these
# directories:
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index 883a24d..7e238e6 100644
--- a/etc/rc.initdiskless
+++ b/etc/rc.initdiskless
@@ -81,8 +81,8 @@
# /conf/default/etc/{rc.conf,rc.local,fstab}. Your fstab should be sure
# to mount a /usr... typically an NFS readonly /usr.
#
-# NOTE! /etc/rc.d/diskless will create /var, /tmp, and /dev.
-# Those filesystems should not be specified in /conf. At least not yet.
+# NOTE! /var, /tmp, and /dev will be created elsewhere.
+# Those filesystems should not be specified in /conf.
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
[ ${dlv:=0} -eq 0 ] && [ ! -f /etc/diskless ] && exit 0
@@ -167,6 +167,17 @@ while [ $# -ge 1 ] ; do
shift
done
+# If /conf/diskless_remount exists, remount all of /conf. This allows
+# multiple roots to share the same conf files.
+if [ -d /conf -a -f /conf/diskless_remount ]; then
+ nfspt=`/bin/cat /conf/diskless_remount`
+ if [ `expr "$nfspt" : '\(.\)'` = "/" ]; then
+ nfspt="${nfsroot}${nfspt}"
+ fi
+ mount_nfs $nfspt /conf
+ chkerr $? "mount_nfs $nfspt /conf"
+fi
+
# Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca},
# and /conf/${bootp_ipa}. For each subdirectory found within these
# directories:
OpenPOWER on IntegriCloud