[Pkg-sysvinit-devel] Re: Suggest new: "update-rc.d <package> disable"

Peter Valdemar Mørch swp5jhu02 at sneakemail.com
Wed Nov 9 21:35:06 UTC 2005


Thomas Hood jdthood-at-yahoo.co.uk |Lists| wrote:
> The right thing to do is to configure the service to be stopped in 
> all runlevels.  In sysv-rc this means that the symlinks for the 
> service should be all K in runlevels 2 through 5.

OK, I understand.

>> Do you know of a more elegant way to accomplish this?
> 
> Use a runlevel editor such as bum or sysv-rc-conf.

>> Otherwise, may I suggest that (at least the man page of)
>> update-rc.d be enhanced to handle this?
>
> update-rc.d is an interface for maintainer scripts to use.  It wasn't
> intended to be used by the administrator.

I'm sorry to hear this. Of course if that is the collective opinion of
the list, I'll accept it and not comment further.

In my searches for a solution to this problem, I came
across many mentions of update-rc.d, but never bum or sysv-rc-conf. bum
I didn't even try out as it requires X (not good for remote work), and
sysv-rc-conf doesn't give me any functionality I don't have with
update-rc.d. And I still need to know beforehand that I need to insert
stop links in runlevels 2 through 5 to avoid having them re-added upon
upgrade. And where is that documented? Nowhere I can find.

The fact is that update-rc.d *is* being used by administrators, and it
is installed on every debian system. I hope it is ok to add a couple of
lines to the man page to avoid system administrators spending countless
hours trying to figure this out. I suggest:

--- update-rc.d.8.orig  2005-11-09 21:53:18.000000000 +0100
+++ update-rc.d.8       2005-11-09 22:20:05.000000000 +0100
@@ -139,6 +142,13 @@
  directories that are not symbolic links to the s1cript
  .BI /etc/init.d/ name
  will be left untouched.
+
+Note to system administrators: When a package is upgraded, links will
+be re-added unless there is at least one
+.BI /etc/rc runlevel .d/[SK]?? name
+file present. So
+to remove links and have that removal survive a package upgrade, leave
+stop links in runlevels 2 through 5.
  .SH OPTIONS
  .TP
  .I -n
@@ -157,6 +167,17 @@
  .nf
  .B "   update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 ."
  .fi
+Remove all links for a script (assuming foobar has been deleted
+already):
+.nf
+.B "   update-rc.d foobar remove"
+.fi
+Remove all links for a script that is still present, but leave stop
+links to ensure this survives package upgrades:
+.nf
+.B "   update-rc.d -f foobar remove"
+.B "   update-rc.d foobar stop 20 2 3 4 5 ."
+.fi
  .SH BUGS

  There should be a way for the system administrator to specify at least

Peter
-- 
Peter Valdemar Mørch
http://www.morch.com



More information about the Pkg-sysvinit-devel mailing list