[arch-general] checking runlevels in rc.shutdown

Aaron Griffin aaronmgriffin at gmail.com
Mon Oct 5 12:36:04 EDT 2009


On Mon, Oct 5, 2009 at 10:53 AM, Damjan Georgievski <gdamjan at gmail.com> wrote:
> Is there a specific reason why rc.shutdown only shutsdown daemons if
> the previous runlevel was 3 or 5?
>
> It's the line that is:
> if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
>
>
> I use both runlevel 4 and 5 (to use different login managers) and when
> shuting from 4 it will sometimes not shutdown clean.
>
>
> Can we actually do without this check for runlevels? It is
> additionally not compatible with Upstart, I understand Upstart is not
> supported in Arch in any way, but still more flexible rc.xxx scripts
> in Arch would be a good thing afterall.

I have a feeling this was done to mirror the rc.multi script (which is
what starts the DAEMONS array). But, you're right. If I boot into
single user mode (runlevel 1) and then start daemons manually,
rc.shutdown should should them down cleanly.

It seems fine to me to remove this check. Any nay sayers?


More information about the arch-general mailing list