[Kurt Roeckx] > I don't see why you think that would be a problem. Either the > init script in runlevel 1 is going to stop the service, or it > gets killed. And going back to runlevel 2 should start the same > services as started otherwise in that runlevel.
The reason is that I remember some bugs with packages related to runlevel 1, and I did not remember the details. :) Now I have had time to test a bit, and believe I remember the details. The problem is with packages starting in runlevels 1-5 and starting a daemon that is killed by killprocs. Such setup is broken, as the daemon will not be started again when switching away from runlevel 1 to runlevels 2-5. I tested switching from runlevel 2 to 1 using debug=echo PREVLEVEL=2 /etc/init.d/rc 1 | grep -v splash I also tested with scripts missing in runlevel 1, and they are started when switching from runlevel 1 to runlevel 2. This is most interesting for scripts that need to run once at boot. For scripts that do nnot need to run when booting into single user mode (and thus should not start in rcS.d/), this setting would be most correct: # Default-Start: 2 3 4 5 # Default-Stop: Runlevel 1 should be equivalent to single user, so there is no need to start in runlevel 1, and there is no need to stop either For scripts that start a daemon and need to do some cleanup when stopping it, this setting would be most correct # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 Not sure if I managed to write this in a clear matter. I find it a bit hard at the moment to wrap my head around all the possibilities. There are at least the following set of transitions to consider: rcS.d -> single user mode -> rc[2-5].d rcS.d -> rc1.d -> single user mode -> rc[2-5].d rcS.d -> rc1.d -> single user mode -> rc[06].d rc[2-5].d -> rc1.d -> single user mode -> rc[2-5].d rc[2-5].d -> rc1.d -> single user mode -> rc[06].d Note that single user mode is not the same as runlevel 1. Runlevel 1 is just one of two ways to end up in single user mode. The other way is booting with 's' or 'single' as a kernel argument. Also note that rcS.d/ is not the single user runlevel (it is not used when switching to single user after boot), and is more accurately called rc.boot in other distributions. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2fl1vd1zca9....@login1.uio.no