Hi,
I have an atm card that needs to be initialized at boot time. I want also
to configure different interfaces and a gateway.
ATM needs 3 daemons: atmsigd, ilmid and atmarpd for my purposes.
I've built the ATM driver in the kernel.
I chose to put all this initialization in 2 scripts. I want to run this
service in runlevels 2,3,4,5, and stop them in levels 0, 1 and 6.
So I put the scripts in /etc/rc.d/init.d and made links in the rc#.d (# for
each level) using chkconfig.
I have two questions
1. Is init levels the correct place to put this initialization, or I
should only launch/stop the daemons in init and do the interface
configurations in /etc/sysconfig/network-scripts/ ?
2. (more important) The servers aren't stopped when I halt or reboot
the system (level 0 and 6). The echo saying that they were killed doesn't
appear. The start process runs ok.
I've include one of the scripts:
------------start script------------------------
#! /bin/sh
#
# chkconfig: 2345 97 12
# description: This script launches all atm daemon needed to run \
# CLIP
# processname: atmsigd
# processname: ilmid
# processname: atmarpd
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo "Starting atmd daemons: "
echo -n " atmsigd "
/usr/src/atm/sigd/atmsigd -b -l syslog -D /var/tmp -t 20
echo
echo -n " ilmid "
/usr/src/atm/ilmid/ilmid -b -l syslog
echo
echo -n "Starting atmarpd daemon: "
/usr/src/atm/arpd/atmarpd -b -l /tmp/atmarpd.log
echo
;;
stop)
echo -n "Stopping atmarpd daemon: "
killproc atmarpd
echo
echo -n "Stopping ilmid daemon: "
killproc ilmid
echo
echo -n "Stopping atmsigd daemon: "
killproc atmsigd
echo ""
;;
status)
status atmsigd
status ilmid
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
exit 0
----------- end script ------------------------------
Any pointers would be appreciated
TIA
Pedro Brandao