Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
Control: tags -1 + moreinfo On Wed, 04 Apr 2012 12:48:03 +0200 josh wrote: > Thanks very much for that quick and very helpful reply! If that's the > case, then just the man page needs to be updated appropriately. It's > very irritating to have documented options be completely ignored, since > you waste time wondering why the heck it's not working. > Can you be more specific, which man page and what parts exactly need to be updated? -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
On Wed, Apr 04, 2012 at 12:48:03PM +0200, josh wrote: > Thanks very much for that quick and very helpful reply! If that's the > case, then just the man page needs to be updated appropriately. It's > very irritating to have documented options be completely ignored, since > you waste time wondering why the heck it's not working. No problem. Note that you do still need the numbers, AFAICT, for backward compatibility, and for systems which aren't using dependency-based booting. However, this is the default on Debian since quite some time now, so I'm not sure to what extent the numerical ordering will have bitrotted in the absence of testing. Hopefully it will go away entirely at some point given that all modern init systems are using some form of dependencies rather than static ordering. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linuxhttp://people.debian.org/~rleigh/ `. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools `-GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
Hi Roger, Thanks very much for that quick and very helpful reply! If that's the case, then just the man page needs to be updated appropriately. It's very irritating to have documented options be completely ignored, since you waste time wondering why the heck it's not working. cheers, -j On 04/04/2012 11:54 AM, Roger Leigh wrote: > On Wed, Apr 04, 2012 at 11:34:25AM +0200, josh wrote: >> 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: > >> update-rc.d: using dependency based boot sequencing >^^ > > Nowadays, the numbers are not used on most systems. We > order the scripts using dependency information in the script > header. > > For example, this is the header from /etc/init.d/postfix: > > ### BEGIN INIT INFO > # Provides: postfix mail-transport-agent > # Required-Start:$local_fs $remote_fs $syslog $named $network $time > # Required-Stop: $local_fs $remote_fs $syslog $named $network > # Should-Start: postgresql mysql clamav-daemon postgrey spamassassin > # Should-Stop: postgresql mysql clamav-daemon postgrey spamassassin > # Default-Start: 2 3 4 5 > # Default-Stop: 0 1 6 > # Short-Description: start and stop the Postfix Mail Transport Agent > # Description: postfix is a Mail Transport agent > ### END INIT INFO > > If you add similar information to your script, it should do > the right thing. Rather than using numbers, explicitly state > which services you need, and it will end up in the correct > order. > > > Regards, > Roger > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
On Wed, Apr 04, 2012 at 11:34:25AM +0200, josh wrote: > 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: > update-rc.d: using dependency based boot sequencing ^^ Nowadays, the numbers are not used on most systems. We order the scripts using dependency information in the script header. For example, this is the header from /etc/init.d/postfix: ### BEGIN INIT INFO # Provides: postfix mail-transport-agent # Required-Start:$local_fs $remote_fs $syslog $named $network $time # Required-Stop: $local_fs $remote_fs $syslog $named $network # Should-Start: postgresql mysql clamav-daemon postgrey spamassassin # Should-Stop: postgresql mysql clamav-daemon postgrey spamassassin # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop the Postfix Mail Transport Agent # Description: postfix is a Mail Transport agent ### END INIT INFO If you add similar information to your script, it should do the right thing. Rather than using numbers, explicitly state which services you need, and it will end up in the correct order. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linuxhttp://people.debian.org/~rleigh/ `. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools `-GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
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 insserv1.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 pn sysv-rc-conf -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org