diff options
author | Roger Leigh <rleigh@debian.org> | 2012-05-13 23:34:28 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2012-05-13 23:34:28 +0100 |
commit | 86aa1024af90ea65a800c8803b4535779ff6ee71 (patch) | |
tree | 35ffb15f54c869c3b8a52d6c0d2e9aefa9f285f5 /debian/schroot.init | |
parent | 99786ec2140fb5d499d0be671cc96ee7843db69e (diff) | |
download | schroot-86aa1024af90ea65a800c8803b4535779ff6ee71.tar.gz |
debian: schroot.init can end sessions on stop and is in runlevel 2
Move from runlevel S to 2, since it's not required for system
startup, and may require services which are started later for
session recovery.
Rename SESSIONS_RECOVER to START_ACTION and add STOP_ACTION to
/etc/default/schroot. Both may be set to "end", which will cause
the session to be ended when given the "start" or "stop" action,
respectively.
Diffstat (limited to 'debian/schroot.init')
-rwxr-xr-x | debian/schroot.init | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/debian/schroot.init b/debian/schroot.init index 7cacf2c0..840a9847 100755 --- a/debian/schroot.init +++ b/debian/schroot.init @@ -6,15 +6,15 @@ # Required-Stop: # Should-Start: lvm # Should-Stop: -# Default-Start: S -# Default-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 # Short-Description: Recover schroot sessions. # Description: Activate any persistent sessions after a reboot. # Setup scripts will be run to mount filesystems and # bring the chroot back to a working state. ### END INIT INFO # -# Copyright © 2006-2007 Roger Leigh <rleigh@debian.org> +# Copyright © 2006-2012 Roger Leigh <rleigh@debian.org> # Copyright © 2007 Federico Di Gregorio <fog@debian.org> # # schroot is free software: you can redistribute it and/or modify it @@ -70,13 +70,16 @@ end_sessions() case "$1" in start|restart|force-reload) - if [ "$SESSIONS_RECOVER" = "end" ] ; then + if [ "$START_ACTION" = "end" ] || [ "$SESSIONS_RECOVER" = "end" ] ; then end_sessions else recover_sessions fi ;; stop) + if [ "$STOP_ACTION" = "end" ] ; then + end_sessions + fi ;; status) ;; |