init scripts

Michael A. Peters mpeters at mac.com
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 - http://www.fastcoder.net/~thumper/software/sysadmin/chkconfig/

It provides chkconfig - which can really simplify init script
management.

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 -

change

stop)
	echo "Stopping SSH Daemon..."
	killproc /usr/sbin/sshd
	;;

to

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

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 mac.com>

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



More information about the lfs-dev mailing list