MagicSpam and Debian 6.0

Debian 6.0 has transitioned over to dependency based boot sequencing. This now allows sysinit scripts to specify dependencies between one another. This is done via an LSB header added to the top of the script. Here’s what the header looks like in /etc/init.d/apache2:

### BEGIN INIT INFO
# Provides:          apache2
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop apache2 web server
### END INIT INFO

MagicSpam places two sysinit scripts into /etc/init.d/, magicspam-milter and magicspam-rn, both of which will error out and go into a loop when you try to perform update-rc.d operations on them. This happens because update-rc.d now uses insserv to handle the runlevel script manipulation and expects the LSB header. If the script does not have the header, update-rc.d borks. Both MagicSpam scripts currently do not have this header. In fact i’ve found that the lack of headers breaks much more, for example I tried to install another package and it wouldn’t let me because of the MagicSpam packages.

The workaround is not to modify the sysinit file directly, but to add a similar named file into /etc/insserv/overrides/ with the necessary LSB headers. update-rc.d will then read these headers in during runtime without you having to modify the original files. If you update the package, it won’t remove your added LSB headers.

Here’s what i’ve got in mine.

/etc/insserv/overrides/magicspam-milter

### BEGIN INIT INFO
# Provides:          magicspam-milter
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop MagicSpam milter
### END INIT INFO

/etc/insserv/overrides/magicspam-rn

### BEGIN INIT INFO
# Provides:          magicspam-rn
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop MagicSpam rn
### END INIT INFO

The permanent fix is for LinuxMagic to added these LSB headers into their package for Debian 6.0. I’m going to mail support about this and see what they say. Even if they don’t fix it, you have a viable workaround if you follow the instructions above.

Good luck!

References:

LSBInitScripts/DependencyBasedBoot

1 thought on “MagicSpam and Debian 6.0”

  1. Thank you for the heads up Brandon! We will be updating our packages in the next upcoming release of MagicSpam to ensure that our daemon init scripts match the specifications! An elegant work around by the way…

    — MagicSpam Support and Development Team —

Leave a Reply to MagicSpam Cancel Reply

Your email address will not be published. Required fields are marked *

Scroll to Top