Well, I don’t know whether it was a good idea to make init scripts systems have dependencies, it had been perfectly simple and straightforward in FHS. And anyone could place scripts in needed order. Seems unnecessary automation to me, and KISS principle violation.
But what happened happened, and we have to live with it. Once it was a simple task to write a init script: just trivial case $1 in start) ;; stop) and so on. What we have now is a complete mess. If you google “missing LSB tags and overrides”, you’ll get the idea. Every init script needs special LSB headers now, but a lot of software just links some internal script to /etc/init.d during the install process, and there is no LSB headers. So you get a lot of complains from e.g. modern Debians and Ubuntus each time you install some package and even installation failures. Might be bad implementation though (insserv). Anyways, fortunately there is a good workaround (bad workaround that is often recommended being to uninstall insserv).
Just put the code below to an override file /etc/insserv/overrides/your_real_script_name
1 2 3 4 5 6 7 |
### BEGIN INIT INFO # Provides: your_init_script_name # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Required-Start: # Required-Stop: ### END INIT INFO |
Note one thing that is not obvious: the name of the override file must be the same as your real script name, but inside the file the header “Provides:” must point to the init script name. Normally it is the same name, but in case you have symlinked a real file to /etc/init.d, and the symlink has a different name, it needs to be done like this, otherwise won’t work.
Home
Contacts
Downloads
RoR
Linux
Notes
ERR
Servers
Русский