Skip site navigation (1)Skip section navigation (2)
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>

next in thread | previous in thread | raw e-mail | index | archive | help
--------------=_4D48012269D001A94CD0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

i created this little patch to rc.diskless2. Right after mount_mfs ...=20=

/var the directory /var/db is created (to pacify mount_nfs). It then=20=

tries to mount_nfs the usr filesystem if there is an entry in=20
/etc/fstab and instead of creating the directory hierarchy in /var=20
=BBmanually=AB I use mtree to achieve this.

The remainig nfs_mounts occur when required.

Andreas

>>>>>>>>>>>>>>>>>> Urspr=FCngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 09.10.00, 17.49.01, schrieb anton@urc.ac.ru (Anton Voronin) zum=20
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=20=

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=20
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


--------------=_4D48012269D001A94CD0
Content-Description: filename="xxyy"
Content-Disposition: inline; filename="xxyy"
Content-Type: text/plain; name ="xxyy"
Content-Transfer-Encoding: quoted-printable

--- /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
=20
 mount_mfs -s ${varsize:=3D65536} -T qp120at dummy /var
-var_dirs=3D"run dev db msgs tmp spool spool/mqueue spool/lpd spool/outp=
ut \
-	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
 #


--------------=_4D48012269D001A94CD0--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001013.19032590>