Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2014 18:07:19 -0500
From:      "Lawrence K. Chen, P.Eng." <lkchen@ksu.edu>
To:        freebsd-rc@freebsd.org
Subject:   Re: Why does rc.d/tmp require 'mountcritremote'?
Message-ID:  <53320C27.9020906@ksu.edu>
In-Reply-To: <52D8182B.6030602@gmail.com>
References:  <52D8182B.6030602@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Speaking of rc.d/tmp (the only thing that REQUIRE:'s tmp is rc.d/cleartmp).

Yet there are rc.d scripts that use /tmp, so they probably expect rc.d/tmp and
rc.d/cleartmp to have been executed before they are...but nothing REQUIRE:'s them.

So, for a long time, I've been having problems where VirtualBox VMs started
using rc.d/vboxheadless can't be managed.  After much hair pulling, I found
that it uses a directory in /tmp, and wondered why it loses track.

So, I ran "rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/*" and found this:

...
/etc/rc.d/LOGIN
/usr/local/etc/rc.d/vboxwebsrv
/usr/local/etc/rc.d/vboxheadless
/etc/rc.d/nfsclient
/etc/rc.d/amd
/etc/rc.d/atm3
/etc/rc.d/auditd
/etc/rc.d/auditdistd
/etc/rc.d/tmp
/etc/rc.d/cleartmp
...

So, I added tmp to rc.d/vboxheadless's REQUIRE: line.

Which has significantly changed the order of things, rc.d/tmp still happens
fairly late in the startup (about midway between NETWORKING and LOGIN)....so
rc.d/vboxheadless get's called after LOGIN (as it REQUIRE:'s), though DAEMON
still comes after LOGIN.

Doing just "rcorder -s nostart /etc/rc.d/*" has rc.d/tmp occuring about midway
between NETWORKING and LOGIN, which is probably due to its "mountcritremote"
requirement.


On 01/16/14 11:34, Vitaly Magerya wrote:
> Hi, folks. In one particular setup I use tmpmfs, but I also have
> links from /var into /tmp, so I need rc.d/tmp to be executed
> before rc.d/var (or at least, before rc.d/SERVERS). This however,
> appears to be impossible: rc.d/tmp requires 'mountcritremote',
> which then requires 'var' through a series of dependencies.
> 
> So my question is: why does rc.d/tmp require 'mountcritremote'?
> Can we change it to 'mountcritlocal' or some such?
> 
> I've looked into commit logs, and this requirement was introduced
> in revision 153028 [1]; the commit log says: "Brooks pointed out
> a case where tmp needs to be run after mountcritremote, so force
> it the other way instead.". Anyone knows what case is this?
> 
> For the reference, rc.d/var, which, just like rc.d/tmp, creates
> an md-backed filesystem, only requires 'mountcritlocal' and
> 'zfs'.
> 
> [1] https://svnweb.freebsd.org/base?view=revision&revision=153028
> _______________________________________________
> freebsd-rc@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-rc
> To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org"
> 

-- 
Who: Lawrence K. Chen, P.Eng. - W0LKC - Sr. Unix Systems Administrator
For: Enterprise Server Technologies (EST) -- & SafeZone Ally



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