summaryrefslogtreecommitdiffstats
path: root/etc/rc.initdiskless
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-09-01 16:33:15 +0000
committerbrooks <brooks@FreeBSD.org>2006-09-01 16:33:15 +0000
commit931f11f642ea91ebaddd3a3b24dcdf9d1bf86497 (patch)
tree8736329fc390d3e848a84e36bc7b41b54a7739ad /etc/rc.initdiskless
parentdfef451bbe997ddd9d1dca1e3c8122a2f689402a (diff)
downloadFreeBSD-src-931f11f642ea91ebaddd3a3b24dcdf9d1bf86497.zip
FreeBSD-src-931f11f642ea91ebaddd3a3b24dcdf9d1bf86497.tar.gz
- Document /conf/diskless_remount in the list of special files.
- Note that diskless_remount files may use ".." to support mounts above the root path. - Copy dot files when populating directories from /conf. [1] PR: misc/102724 [1] Submitted by: Attila Nagy <bra at fsn.hu> [1]
Diffstat (limited to 'etc/rc.initdiskless')
-rw-r--r--etc/rc.initdiskless14
1 files changed, 11 insertions, 3 deletions
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index c1941c2..90ac718 100644
--- a/etc/rc.initdiskless
+++ b/etc/rc.initdiskless
@@ -76,6 +76,9 @@
# If the file contains a pathname starting with "/", then
# the root path is prepended to it; this allows relocation of
# the root filesystem without changing configuration files.
+# Because mount_nfs understands ".." in paths, it is
+# possible to mount from locations above the NFS root with
+# paths such as "/../../etc".
#
# /conf/T/M/md_size
# The contents of the file specifies the size of the memory
@@ -97,6 +100,12 @@
# The list of paths contained in the file are rm -rf'd
# relative to /SUBDIR.
#
+# /conf/diskless_remount
+# Similar to /conf/T/M/diskless_remount above, but allows
+# all of /conf to be remounted. This can be used to allow
+# multiple roots to share the same /conf.
+#
+#
# You will almost universally want to create the following files under /conf
#
# File Content
@@ -222,8 +231,7 @@ fi
# The list of filesystems to umount after the copy
to_umount=""
-# If /conf/diskless_remount exists, remount all of /conf. This allows
-# multiple roots to share the same conf files.
+# If /conf/diskless_remount exists, remount all of /conf.
if [ -d /conf -a -f /conf/diskless_remount ]; then
nfspt=`/bin/cat /conf/diskless_remount`
if [ `expr "$nfspt" : '\(.\)'` = "/" ]; then
@@ -300,7 +308,7 @@ for i in ${templates} ; do
subdir=${j##*/}
if [ -d $j -a ! -f $j.cpio.gz ]; then
create_md $subdir
- cp -Rp $j/* /$subdir
+ cp -Rp $j/ /$subdir
fi
done
for j in /conf/$i/*.cpio.gz ; do
OpenPOWER on IntegriCloud