Date: Fri, 13 Oct 2000 19:03:25 GMT From: Andreas Haakh <Andreas@Haakh.de> To: anton@urc.ac.ru (Anton Voronin), freebsd-stable@freebsd.org Subject: Re: rc.diskless2 tries to use filesystems not mounted yet Message-ID: <20001013.19032590@wilma.IbHaakh.de> In-Reply-To: <Pine.BSF.4.10.10010092334180.312-100000@belle.rnoc-dialup.urc.ac.ru> References: <Pine.BSF.4.10.10010092334180.312-100000@belle.rnoc-dialup.urc.ac.ru>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Hi,
i created this little patch to rc.diskless2. Right after mount_mfs ...
/var the directory /var/db is created (to pacify mount_nfs). It then
tries to mount_nfs the usr filesystem if there is an entry in
/etc/fstab and instead of creating the directory hierarchy in /var
»manually« I use mtree to achieve this.
The remainig nfs_mounts occur when required.
Andreas
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 09.10.00, 17.49.01, schrieb anton@urc.ac.ru (Anton Voronin) zum
Thema rc.diskless2 tries to use filesystems not mounted yet:
> Hi all.
> Yes, I know that rc.diskless2 may be redefined. But it seems not to
work
> itself. It uses chown, find and cpio that are located in /usr. But in
the
> diskless configuration /usr is usually an nfs partition, so it is
mounted
> much later than ${mount_diskless} is called. So shouldn't this script
> mount all nfs filesystems itself?
> Regards,
> Anton Voronin
> Ural Regional Center of FREEnet,
> Southern Ural State University,
> Chelyabinsk, Russia
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message
[-- Attachment #2 --]
--- /etc/rc.diskless2 Sat Oct 7 09:34:36 2000
+++ /nodi/etc/rc.diskless2 Fri Oct 13 18:37:01 2000
@@ -13,18 +13,15 @@
fi
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
+mkdir -p /var/db
+case "`mount -d /usr`" in
+ *mount_nfs*)
+ echo "Mounting NFS filesystem /usr."
+ mount /usr
+ ;;
+esac
+mtree -deU -f /etc/mtree/BSD.var.dist -p /var/ >/dev/null
+echo "Created file hierarchy in /var."
#
# XXX make sure to create one dir for each printer as requested by lpd
#
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001013.19032590>
