init scripts

Michael A. Peters mpeters at
Tue Apr 15 02:52:19 PDT 2003

Hi - I have a couple of suggestions related to blfs. Hope this is the
right list ...

Anyway -

It provides chkconfig - which can really simplify init script

It's not suitable for lfs because it won't handle the rcsysinit stuff -
but it would be a better tool for init scripts installed from blfs -
which generally have their symlinks in rc{0,1,2,3,4,5,6}.d

It's really easy to use - put something like this in the init script:

# chkconfig: 2345 20 80
# description: Starts the gpm mouse service with allows you to use \
#               a mouse in console mode.

Then - chkconfig --add gpm

All the start/stop symlinks are made for you.

Another note- in the sshd init script in BLFS -


	echo "Stopping SSH Daemon..."
	killproc /usr/sbin/sshd


	if [ -f /var/run/ ]; then
		echo "Stopping SSH Daemon..."
		killproc /usr/sbin/sshd

The daemon goes down when the sendsignals script is run, so it isn't
running anymore when it gets sent the stop argument when shutting the
machine down.

Having it check for the PID file before it brings it down will get rid
of the ATTN flag when the shutdown/reboot process tries to stop it.

Michael A. Peters <mpeters at>

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list