Tuesday, April 5, 2011

Insserv

Understanding insserv was easy enough but I am still not convinced that dependency based booting should be the default. It is a choice best left to the sysadmin. Anyhow, what's done, is done.

I solved the problem of NFS depending on DNS by creating an override file in /etc/insserv/overrides/nfs-kernel-server:
### BEGIN INIT INFO
# Provides: nfs-kernel-server
# Required-Start: $remote_fs nfs-common $portmap $time $named
# Required-Stop: $remote_fs nfs-common $portmap $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Kernel NFS server support
# Description: NFS is a popular protocol for file sharing across
# TCP/IP networks. This service provides NFS server
# functionality, which is configured via the
# /etc/exports file.
### END INIT INFO
and running
# insserv nfs-kernel-server
to update the start up order.

My rtorrent initscript is based on this one, which does not have the dependency header that insserv requires. I used the header from the initscript included in the SABnzb+ package since it seemed reasonable that rtorrent would have the same requirements. I inserted the following into the rtorrent initscript:
### BEGIN INIT INFO
# Provides: rtorrent
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: rtorrent BitTorrent client
### END INIT INFO
and ran
# insserv rtorrent.sh
to activate the script. I didn't bother using an override file since the script is not part of a package.

And thus ended my first squeeze upgrade. Extrapolating this experience, my customer's servers, which are very heavily customized, will likely require much more work than the previous upgrade. Oh, joy!

No comments:

Post a Comment