Date: Wed, 25 Apr 2001 22:52:49 -0400 From: Brian Dean <bsd@bsdhome.com> To: Sven Huster <sven.huster@mailsurf.com> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: diskless startup again Message-ID: <20010425225249.B54548@vger.bsdhome.com> In-Reply-To: <5.1.0.14.0.20010425105221.02657d00@mx01.mailsurf.com>; from sven.huster@mailsurf.com on Wed, Apr 25, 2001 at 11:00:04AM %2B0200 References: <5.1.0.14.0.20010425105221.02657d00@mx01.mailsurf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 25, 2001 at 11:00:04AM +0200, Sven Huster wrote: > Hi there, > > 1. > maybe it is after the release of FreeBSD-4.3 possible to think about the > remaining mount_null in /etc/rc.diskless* again. > > the two solutions i see are: > - seperate mount_mfs for /tmp > - symlink /tmp to /var/tmp by default in the scripts Well, minimally it should work out of the box in a standard FS layout. The way it is, it doesn't, one has to make /tmp a symlink to somewhere writable. Perhaps, by default, a check to see if /tmp is a symlink, and if not, keep it mounted within rc.diskless1 (or remount it within rc.diskless2) as an MFS. But if /tmp is a symlink, then we would just assume that it points to somewhere writable. Something like this should suffice: if [ ! -h /tmp -o -n "$diskless_tmpmfs_size" ]; then if [ -z "$diskless_tmpmfs_size" ]; then diskless_tmpmfs_size=20480 # default size fi mount_mfs -s $diskless_tmpmfs_size -T qp120at dummy /tmp fi That way, two simple cases are provide for in the default configuration, /tmp could be symlinked to /var/tmp which is in a memory filesystem, or /tmp could be it's own, custom-sized memory filesystem. If you need something different than that, well, that's what the diskless_mount hook (default to rc.diskless2) is provided to cover. > 2. > Another thing is that i want to run different local daemons > depending on the machines (ip's or hostnames), or machine groups So > what i thought is to add the same function as for /etc to > /usr/local/etc, maybe which the enhancement of grouping machines in > a config file. This might be also useful for global config of > "normal" machines, which then can be mirrored to all of them. This is probably not such a good idea. If you need to do anything special, you should initialize "diskless_mount" to point to your supplied replacement for rc.diskless2. Everyone will want to do things a little differently, which is why there is already an option to change the default behaviour and supply your own custom script. You could easily set up /usr/local/etc as an MFS at this point in the boot and achieve what you want, just use rc.diskless2 as a starting point and expand on it to meet your needs. -Brian -- Brian Dean bsd@FreeBSD.org bsd@bsdhome.com 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?20010425225249.B54548>