[arch-general] checking runlevels in rc.shutdown
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. -- damjan
On Mon, Oct 5, 2009 at 10:53 AM, Damjan Georgievski <gdamjan@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?
On Mon, Oct 5, 2009 at 12:36, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
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?
I can't think of any reason not to remove it.
Daenyth Blank wrote:
On Mon, Oct 5, 2009 at 12:36, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
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?
I can't think of any reason not to remove it.
Me neither. (Random fact: That condition check was last modified 7 years and 6 months ago. :)
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.
BTW, how about splitting rc.sysinit, rc.multi and rc.shutdown in separate scriptlets? I don't propose that the installed scripts should be split, but the source files could be kept split and a simple Makefile could "compile" them in the form used today? (this would allow for easier reusing them in alternative init systems) -- damjan
On Mon, Oct 5, 2009 at 12:51 PM, Damjan Georgievski <gdamjan@gmail.com> wrote:
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.
BTW, how about splitting rc.sysinit, rc.multi and rc.shutdown in separate scriptlets?
I don't propose that the installed scripts should be split, but the source files could be kept split and a simple Makefile could "compile" them in the form used today?
(this would allow for easier reusing them in alternative init systems)
I removed the if and pushed it to master. Regardin the reusing and things like that - not my bag. It seems like it'd just overcomplicate things for no gain to us (we only ship one init system).
participants (4)
-
Aaron Griffin
-
Daenyth Blank
-
Damjan Georgievski
-
Evangelos Foutras