diff -Nurp file-rc-0.8.10/update-rc.d file-rc-0.8.10.patched/update-rc.d --- file-rc-0.8.10/update-rc.d 2006-06-30 22:13:33.000000000 +0200 +++ file-rc-0.8.10.patched/update-rc.d 2006-07-24 14:39:23.668946737 +0200 @@ -29,7 +29,7 @@ false=1 print_usage() { cat < remove - update-rc.d [-n] defaults [NN | sNN kNN] + update-rc.d [-n] defaults|multiuser [NN | sNN kNN] update-rc.d [-n] start|stop NN runlvl [runlvl] [...] . -n: not really -f: force @@ -237,9 +237,14 @@ STARTLIST= STOPLIST= action="$1" case "$action" in - defaults) + defaults|multiuser) STARTLEVELS="2 3 4 5" - STOPLEVELS="0 1 6" + if [ $action = "multiuser" ] + then + STOPLEVELS="1" + else + STOPLEVELS="0 1 6" + fi case "$#" in "1") START_SORT_NO="20" diff -Nurp file-rc-0.8.10/update-rc.d.8 file-rc-0.8.10.patched/update-rc.d.8 --- file-rc-0.8.10/update-rc.d.8 2004-03-27 12:10:45.000000000 +0100 +++ file-rc-0.8.10.patched/update-rc.d.8 2006-07-24 14:15:13.382678924 +0200 @@ -15,7 +15,8 @@ update\-rc.d \- modify runlevel.conf to .HP .B update-rc.d .RI [ -n ] -.IB name " defaults" +.IB name +.BR defaults | multiuser .RI [ NN " | " NN-start " " NN-stop ] .HP .B update-rc.d @@ -59,7 +60,7 @@ and the .SH INSTALLING INIT SCRIPTS When run with either the -.BR defaults ", " start ", or " stop +.BR defaults ", " multiuser ", " start ", or " stop options, update-rc.d adds a line to .I /etc/runlevel.conf pointing to the script @@ -81,15 +82,25 @@ adds an entry to start the service in ru .BR 2 , 3 , 4 , 5 and stop the service in runlevels .BR 0 , 1 , 6 . +If +.B multiuser +is used then +.B update-rc.d +will make links to start the service in runlevels +.BR 2 , 3 , 4 , 5 +and to stop the service in only runlevel +.BR 1 . By default all the links will have sequence code 20, but this can be overridden by supplying one or two .I NN -arguments; one argument overrides the sequence code for both start and +arguments to either +.BR defaults " or " multiuser ; +one argument overrides the sequence code for both start and stop entries whereas of two arguments the first overrides the code for start runlevels and the second that for stop runlevels. Instead of -.B defaults +.BR defaults " or " multiuser the runlevels in which to start and stop the service may be specified explicitly using a series of sets of arguments: @@ -161,7 +172,31 @@ Equivalent command using explicit argume .nf .B " update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 ." .fi +Insert links for a service that should be running during multi-user mode, +but that does not need to be explicitly stopped on shutdown: +.nf +.B " update-rc.d foobar multiuser" +.fi +Equivalent command using explicit argument sets: +.nf +.B " update-rc.d foobar start 20 2 3 4 5 . stop 20 1 ." +.fi + +.SH NOTES +The +.B multiuser +option is an Ubuntu-extension intended to reduce the amount of time spent +stopping services during shutdown and reboot that have no particular +requirement to be explicitly stopped. +Unless your init script does something in the +.B stop +command that is more than just sending the +.BR TERM " or " KILL +signal to the running process, you should strongly consider using +.B multiuser +instead of +.BR defaults . .SH BUGS There should be a way for the system administrator to specify at least