proposal: etc/rc.d/initdiskless -> /etc/rc.initdiskless

Mike Makonnen mtm at identd.net
Sun Feb 27 14:34:55 GMT 2005


On Thu, Feb 24, 2005 at 02:12:57PM -0800, Brooks Davis wrote:
> I would like to propose that we move the initdiskless script out of rc.d
> and back into /etc.  The reason for doing this is that initdiskless is
> really about bootstrapping /etc from a minimial configuration.  Thus
> running it via rcorder is really running it too early. 
                                              ^^^^^^^^^
I think you mean too late, right?

> By moving it to
> /etc and running it directly from /etc/rc (possiably conditionally based
> on the existance of /conf) we fix this issue.  The main benefit of this
> is that /etc/rc.d can now be modified or created entierly from entries
> under /conf which could make it easier to maintain extra scripts in the
> main flow of rc.d.
> 
> The change to /etc/rc would look something like:
> 
> diff -u -p -r1.335 rc
> --- rc  8 Oct 2004 14:23:49 -0000       1.335
> +++ rc  24 Feb 2005 21:02:18 -0000
> @@ -50,6 +50,10 @@ HOME=/
>  PATH=/sbin:/bin:/usr/sbin:/usr/bin
>  export HOME PATH
>  
> +if [ -d /conf ]; then
> +	/etc/rc.initdiskless
> +fi
> +

This is too generic. Isn't there some way of definitely knowing
whether this is a diskless boot?

>  . /etc/rc.subr
>  
>  # Note: the system configuration files are loaded as part of
> 
> 
> Does anyone have major objections to this change?  The goal is to run
> initdiskless as early as possible so /etc can be as minimal as possible
> at that point.

Sounds ok to me.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F55
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon !


More information about the freebsd-rc mailing list