[Pkg-sysvinit-devel] Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter

josh jbuhl_nospam at gmx.net
Wed Apr 4 09:34:25 UTC 2012


Package: sysv-rc
Version: 2.88dsf-22.1
Severity: important
File: /usr/sbin/update-rc.d

update-rc.d currently ignores the sequence number parameter which
gives the digits in the start and kill links in the rc*.d dirs. This
is actually important since some init.d scripts need to be started
before others, so you need these params.


For example, I've written an init.d script that I want to
start before another service gets started. I want it to have the start
index 20. It also should not be stopped before certain other
services are stopped, so I want it to have a stop index of
02. However:

howlingfantods:~# update-rc.d -n iptrafvol start 20 2 3 4 5 . stop 02 0
1 6 .
update-rc.d: using dependency based boot sequencing
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc0.d/K01iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc1.d/K01iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc2.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc3.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc4.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc5.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc6.d/K01iptrafvol
insserv: dryrun, not creating .depend.boot, .depend.start, and .depend.stop

update-rc.d ignores the params 20 and 02 and installs them with the
default indices of 23 and 01 (this is dry run output, but I also ran
them really and it set the links just like in the dry run). I know my
syntax is correct because I've used it before and because there's the
following example in the man page:

update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .


It also does this if using the default runlevels:

howlingfantods:~# update-rc.d -n iptrafvol defaults 20 02
update-rc.d: using dependency based boot sequencing
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc0.d/K01iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc1.d/K01iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc2.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc3.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc4.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc5.d/S23iptrafvol
insserv: enable service ../init.d/iptrafvol ->
/etc/init.d/../rc6.d/K01iptrafvol
insserv: dryrun, not creating .depend.boot, .depend.start, and .depend.stop


Again, there's a corresponding example in the man page for this syntax:

Insert links at default runlevels when B requires A
          update-rc.d script_for_A defaults 80 20
          update-rc.d script_for_B defaults 90 10


so something's broken.


cheers,

-j





-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=locale: Cannot set
LC_ALL to default locale: No such file or directory
UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sysv-rc depends on:
ii  debconf [debconf-2.0]  1.5.41
ii  insserv                1.14.0-2.1
ii  sysvinit-utils         2.88dsf-13.13

Versions of packages sysv-rc recommends:
ii  lsb-base  3.2-28

Versions of packages sysv-rc suggests:
pn  bum           <none>
pn  sysv-rc-conf  <none>

-- debconf-show failed





More information about the Pkg-sysvinit-devel mailing list