2011/11/24 lrhorer <lrho...@satx.rr.com>: > Dmitriy Matrosov wrote: > >> 2011/11/24 lrhorer <lrho...@satx.rr.com>: >>> OK, so here's the deal. I compiled and installed ncid on one of my >>> Debian servers Everything seems to be working just fine. There's >>> one small item, though. When I took the init scripts and ran >>> update-rc.d, it gave me a warning saying "stop runlevel arguments (0 >>> 1 6) do not match LSB Default-Stop values (S 0 1 6)". When I looked >>> at the scripts, they have the line >>> >>> # Default-Stop: S 0 1 6 >>> >>> in the LSB. Now as I understand it, by the script definition, there >>> should be links in /etc/rcS.d to the scripts in /etc/init.d with >>> names like K20ncidd.init, and so forth. Per the output of >>> update-rc.d, however, these links were not created, but all the >>> others were. >>> >>> First of all, why did the routine put up that warning and fail to >>> create the links? >> >> As i understand, update-rc.d does not create any links - it just >> manages them (disables (rename SXX to KXX), enables (rename KXX to >> SXX), etc). > > No, that's not true, at all. See my response to Arno above. If one > supplies the enable or disable argument, then indeed update-rc.d does > not create links, but the other commands do create or delete links: > Well, indeed, you're right. But who actually creates links: insserv or update-rc.d ? And who actually calculates dependencies? And what does update-rc.d really reads from LSB header: only default runlevels or all fields or nothing (all reads insserv)? Unfortunately, i don't know perl to read update-rc.d sources.
Anyway, it seems, that following pairs # insserv script and # update-rc.d script defaults and # insserv -r script and # update-rc.d script remove do exactly the same thing and i didn't notice this for the first time. > RAID-Server:/etc/init.d# update-rc.d > usage: update-rc.d [-n] [-f] <basename> remove > update-rc.d [-n] <basename> defaults [NN | SS KK] > update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] . > update-rc.d [-n] <basename> disable|enable [S|2|3|4|5] > -n: not really > -f: force > > >From the man page: > > NAME > update-rc.d - install and remove System-V style init script links > .... > > When run with either the defaults, start, or stop options, update-rc.d > makes links /etc/rcrunlevel.d/[SK]NNname that point to the script > /etc/init.d/name. > >> This is insserv duty to install init script links. Try >> reinstall init script with insserv: frist - remove, and then install >> again. >> # insserv -r <init_script_name> >> # inssert <init_script_name> > > It would be a lot easier just to create the link by hand. As Arno > pointed out, however, there's really very little or no operational > impact to the kill script for runlevel S being missing. Then, what's the purpose of having S in 'Default-Stop' ? In /usr/share/doc/sysv-rc/README.runlevels.gz written, that switching to single user is done by switching to runlevel 1, so it's runlevel 1, who should have K script, but not runlevel S. Well, if i understand correctly, > > Reading through the man page again, I can across this, however: > > If defaults is used then update-rc.d will make links to start the > service in runlevels 2345 and to stop the service in runlevels 016. > > So that's why it didn't create the runlevel S script. This behavior is > the legacy behavior, mandated by the existence of a file named .legacy- > bootordering. Sure enough, the file is there. Legacy behavior is to create K scripts at runlevel S ? I may be wrong, as usual, but as i understand runlevel S is not legacy, it is just runlevel not to be switched to directly and its scripts runs only once at system boot, and never again at any runlevel switches (hence, it does not need any K scripts and should not be in Default-Stop). As i understand update-rc.d manpage, .legacy-bootordering simply disables dependency resolution according to LSB header and, hence, assigns to script specified on cmd number (for SXX/KXX) instead of calculated one. And the same for runlevels, but it does not obsolete in any way runlevel S. 2011/11/24 lrhorer <lrho...@satx.rr.com>: > Dmitriy Matrosov wrote: > >> 2011/11/24 Arno Schuring <aelschur...@hotmail.com>: >>> lrhorer (lrho...@satx.rr.com on 2011-11-24 03:38 -0600): > [..] >> >> It seems, that 'insserv -d' also reorders other init scripts (though i >> don't understand why) > > Um, because it is supposed to? I mean, the whole point of dependency > based booting is to make sure the proper services are all available when > they need to be, and the mechanism of that is the ordering of the > scripts. Whenever one script changes, it may affect other scripts. > Well, let's me explain what i mean on example: # ls -l rc2.d/ | grep -eisc -ebacula lrwxrwxrwx 1 root root 19 Nov 8 17:58 S18bacula-sd -> ../init.d/bacula-sd lrwxrwxrwx 1 root root 19 Nov 24 15:04 S19bacula-fd -> ../init.d/bacula-fd lrwxrwxrwx 1 root root 25 Nov 24 23:05 S19isc-dhcp-server -> ../init.d/isc-dhcp-server lrwxrwxrwx 1 root root 25 Nov 24 15:04 S20bacula-director -> ../init.d/bacula-director then i want to isc-dhcp-server to run, e.g., before bacula-fd and add 'X-Start-Before: bacula-fd' to init.d/isc-dhcp-server, and then run # insserv -n insserv: remove service /etc/init.d/../rc2.d/S20bacula-director insserv: enable service ../init.d/bacula-director -> /etc/init.d/../rc2.d/S21bacula-director insserv: remove service /etc/init.d/../rc2.d/S19bacula-fd insserv: enable service ../init.d/bacula-fd -> /etc/init.d/../rc2.d/S20bacula-fd insserv: remove service /etc/init.d/../rc3.d/S20bacula-director insserv: enable service ../init.d/bacula-director -> /etc/init.d/../rc3.d/S21bacula-director insserv: remove service /etc/init.d/../rc3.d/S19bacula-fd insserv: enable service ../init.d/bacula-fd -> /etc/init.d/../rc3.d/S20bacula-fd insserv: remove service /etc/init.d/../rc4.d/S20bacula-director insserv: enable service ../init.d/bacula-director -> /etc/init.d/../rc4.d/S21bacula-director insserv: remove service /etc/init.d/../rc4.d/S19bacula-fd insserv: enable service ../init.d/bacula-fd -> /etc/init.d/../rc4.d/S20bacula-fd insserv: remove service /etc/init.d/../rc5.d/S20bacula-director insserv: enable service ../init.d/bacula-director -> /etc/init.d/../rc5.d/S21bacula-director insserv: remove service /etc/init.d/../rc5.d/S19bacula-fd insserv: enable service ../init.d/bacula-fd -> /etc/init.d/../rc5.d/S20bacula-fd insserv: dryrun, not creating .depend.boot, .depend.start, and .depend.stop # insserv # ls -l rc2.d/ | grep -eisc -ebacula lrwxrwxrwx 1 root root 19 Nov 8 17:58 S18bacula-sd -> ../init.d/bacula-sd lrwxrwxrwx 1 root root 25 Nov 24 23:05 S19isc-dhcp-server -> ../init.d/isc-dhcp-server lrwxrwxrwx 1 root root 19 Nov 24 23:37 S20bacula-fd -> ../init.d/bacula-fd lrwxrwxrwx 1 root root 25 Nov 24 23:37 S21bacula-director -> ../init.d/bacula-director As you can see, insserv only changes what was necessary to change. But if i run # insserv -dn insserv: remove service /etc/init.d/../rc1.d/S22single insserv: enable service ../init.d/single -> /etc/init.d/../rc1.d/S24single insserv: remove service /etc/init.d/../rc1.d/S21bootlogs insserv: enable service ../init.d/bootlogs -> /etc/init.d/../rc1.d/S23bootlogs insserv: remove service /etc/init.d/../rc2.d/S17apt-cacher-ng insserv: enable service ../init.d/apt-cacher-ng -> /etc/init.d/../rc2.d/S18apt-cacher-ng insserv: remove service /etc/init.d/../rc2.d/S20bacula-director insserv: enable service ../init.d/bacula-director -> /etc/init.d/../rc2.d/S23bacula-director insserv: remove service /etc/init.d/../rc2.d/S17rsyslog insserv: enable service ../init.d/rsyslog -> /etc/init.d/../rc2.d/S18rsyslog insserv: remove service /etc/init.d/../rc2.d/S19bacula-fd insserv: enable service ../init.d/bacula-fd -> /etc/init.d/../rc2.d/S22bacula-fd insserv: remove service /etc/init.d/../rc2.d/S19isc-dhcp-server insserv: enable service ../init.d/isc-dhcp-server -> /etc/init.d/../rc2.d/S21isc-dhcp-server insserv: remove service /etc/init.d/../rc2.d/S18bind9 insserv: enable service ../init.d/bind9 -> /etc/init.d/../rc2.d/S19bind9 insserv: remove service /etc/init.d/../rc2.d/S18dbus insserv: enable service ../init.d/dbus -> /etc/init.d/../rc2.d/S19dbus insserv: remove service /etc/init.d/../rc2.d/S18atd insserv: enable service ../init.d/atd -> /etc/init.d/../rc2.d/S19atd insserv: remove service /etc/init.d/../rc2.d/S18bacula-sd insserv: enable service ../init.d/bacula-sd -> /etc/init.d/../rc2.d/S19bacula-sd insserv: remove service /etc/init.d/../rc2.d/S19kerneloops insserv: enable service ../init.d/kerneloops -> /etc/init.d/../rc2.d/S21kerneloops insserv: remove service /etc/init.d/../rc2.d/S17icecast2 insserv: enable service ../init.d/icecast2 -> /etc/init.d/../rc2.d/S18icecast2 [..and many-many lines more..] In other words, it changes sequence number of almost every script. This surely not only what was required by such dependency change. And i don't understand, why it's doing this. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAFdVUFkodrrWXdbndr=qxxjnntdsohkov2yjvdz5jkxcsp9...@mail.gmail.com