I am experiencing strange behavior with LSB Init Scripts in Debian Wheezy. I can demonstrate the problem on following example:
/etc/init.d/resolvconf starts in
S and stops in runlevels
# Default-Start: S # Default-Stop: 0 6
And indeed, when I use
chkconfig resolvconf on to turn the script on, I see that symlinks have been created in respective runlevel directories:
$ ls /etc/rc?.d/*resolvconf /etc/rc0.d/K02resolvconf /etc/rc6.d/K02resolvconf /etc/rcS.d/S13resolvconf
When I turn the script off with
chkconfig resolvconf off, the symlinks disappear. So far so good.
Now, I have decided I don't want the script to start in
S (I am going to start it manually), but I still want it to stop in runlevels
6. I change default start accordingly:
# Default-Start: # Default-Stop: 0 6
and turn the script on
chkconfig resolvconf on. And nothing happens.
$ ls /etc/rc?.d/*resolvconf ls: cannot access /etc/rc?.d/*resolvconf: No such file or directory
no symlinks have been created, and the script does not stop in runlevels
What is happening here?
How can I have a script only run (stop) in runlevels
6, without starting in
as suggested by @Rui F Ribeiro, I have completely removed the
# Default-Start: line. Now when I run
chkconfig resolvconf on, I get following errors:
insserv: Script resolvconf is broken: incomplete LSB comment. insserv: missing `Default-Start:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for script `resolvconf'
the symlinks are created, though.
$ ls /etc/rc?.d/*resolvconf /etc/rc0.d/K02resolvconf /etc/rc6.d/K02resolvconf
But why do I get the errors?