From owner-freebsd-stable Thu Apr 26 7:39:17 2001 Delivered-To: freebsd-stable@freebsd.org Received: from picard.skynet.be (picard.skynet.be [195.238.3.131]) by hub.freebsd.org (Postfix) with ESMTP id 7361A37B423 for ; Thu, 26 Apr 2001 07:39:12 -0700 (PDT) (envelope-from sven.huster@mailsurf.com) Received: from hodge.skynet.be (hodge.skynet.be [195.238.2.35]) by picard.skynet.be (8.11.2/8.11.2/Skynet-OUT-2.11) with ESMTP id f3QEd3n03466; Thu, 26 Apr 2001 16:39:03 +0200 (MET DST) (envelope-from ) Received: from 07.mailsurf.com (194-78-218-7.pro.turboline.skynet.be [194.78.218.7]) by hodge.skynet.be (8.11.2/8.11.2/Skynet-SMARTRELAY-2.11) with ESMTP id f3QEccK08486; Thu, 26 Apr 2001 16:38:38 +0200 (MET DST) (envelope-from ) Message-Id: <5.1.0.14.0.20010426162542.02e1bec0@mx01.mailsurf.com> X-Sender: shu@mx01.mailsurf.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 26 Apr 2001 16:38:56 +0200 To: Brian Dean From: Sven Huster Subject: Re: diskless startup again Cc: freebsd-stable@FreeBSD.ORG In-Reply-To: <20010425225249.B54548@vger.bsdhome.com> References: <5.1.0.14.0.20010425105221.02657d00@mx01.mailsurf.com> <5.1.0.14.0.20010425105221.02657d00@mx01.mailsurf.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 04:52 AM 4/26/01, Brian Dean wrote: >*This message was transferred with a trial version of CommuniGate(tm) Pro* >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. I think thats a quite good solution. works with "normal" setup, /tmp own dir and with customized symlink. also the diskless_tmpmfs_size var i like but shouldnt ${diskless_tmpmfs_size:=20480} also work? > > 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. ok, i did get the thing with diskless_mount, now ok. but diskless_mount is set in rc.diskless1, i think, and so not changeable in std config files (like rc.conf, but this will be copied in rc.diskless1) so i am not sure what to do. regards Sven Huster Senior IT Systems Administrator *BSD, Linux, Solaris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message