summaryrefslogtreecommitdiffstats
path: root/etc/rc.diskless2
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2000-01-06 18:17:38 +0000
committerluigi <luigi@FreeBSD.org>2000-01-06 18:17:38 +0000
commita924d4cf00576f674fb2ea1d40a5f7011f7ec128 (patch)
treef32a17c80f0d266631db3ff9b776980765ef0e52 /etc/rc.diskless2
parentd8b8a4a2a7b05714878e3ad14fd527346f28f443 (diff)
downloadFreeBSD-src-a924d4cf00576f674fb2ea1d40a5f7011f7ec128.zip
FreeBSD-src-a924d4cf00576f674fb2ea1d40a5f7011f7ec128.tar.gz
Cleanup diskless support in current, mostly aligning it to the one
in the 3.x branch. Also remove the dependency on /usr to find the boot address/interface. Mostly-submitted-abd-tested-by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
Diffstat (limited to 'etc/rc.diskless2')
-rw-r--r--etc/rc.diskless224
1 files changed, 13 insertions, 11 deletions
diff --git a/etc/rc.diskless2 b/etc/rc.diskless2
index d7ba532..17b0bcb 100644
--- a/etc/rc.diskless2
+++ b/etc/rc.diskless2
@@ -11,26 +11,28 @@ elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
-mount_mfs -s ${var_run_sectors:=2048} -T qp120at dummy /var/run
-mount_mfs -s ${var_db_sectors:=16384} -T qp120at dummy /var/db
-mount_mfs -s ${var_tmp_sectors:=65536} -T qp120at dummy /var/tmp
-mount_mfs -s ${var_spool_sectors:=65536} -T qp120at dummy /var/spool
+mount_mfs -s ${varsize:=65536} -T qp120at dummy /var
+var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \
+ spool/output/lpd"
+for i in ${var_dirs}
+do
+ mkdir /var/${i}
+done
chmod 755 /var/run
chmod 755 /var/db
chmod 755 /var/spool
chmod 1777 /var/tmp
+chown -R root.daemon /var/spool/output
+chgrp daemon /var/spool/lpd
+#
+# XXX make sure to create one dir for each printer as requested by lpd
+#
if [ ! -h /tmp -a ! -h /var/tmp ]; then
mount_null /var/tmp /tmp
fi
-mkdir /var/spool/mqueue
-mkdir /var/spool/lpd
-mkdir /var/spool/output
-mkdir /var/spool/output/lpd
-chown -R root.daemon /var/spool/output
-chgrp daemon /var/spool/lpd
-
+# extract a list of device entries, then copy them to a writable partition
(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp
mount_mfs -s 4096 -i 512 -T qp120at dummy /dev
(cd /; cpio -i -H newc -d < /tmp/dev.tmp)
OpenPOWER on IntegriCloud