From: chas w. <ch...@us...> - 2007-12-29 20:09:37
|
Update of /cvsroot/linux-atm/linux-atm/src/config/init-redhat In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16115/src/config/init-redhat Modified Files: Tag: V2_5_0 atm Log Message: add dist tag (or _vendor) to the built rpms try to make the startup script a bit more cross-platform Index: atm =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/config/init-redhat/atm,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** atm 28 Dec 2007 15:11:51 -0000 1.2.2.2 --- atm 29 Dec 2007 20:09:34 -0000 1.2.2.3 *************** *** 1,15 **** #!/bin/sh # ! # /etc/rc.d/init.d/atm - Bring up/down ATM # # chkconfig: 2345 09 91 ! # description: loads/unloads atm drivers and starts/stops basic services # # Source function library. ! . /etc/rc.d/init.d/functions if [ ! -f /etc/sysconfig/atm ]; then ! exit 0 fi --- 1,64 ---- #!/bin/sh # ! # /etc/rc.d/init.d/atm - Bring up/down ATM # # chkconfig: 2345 09 91 ! # description: Loads/Unloads ATM drivers and starts/stops basic services # + ### BEGIN INIT INFO + # Provides: atm + # Required-Start: $local_fs dbus haldaemon + # Should-Start: + # Required-Stop: + # Should-Stop: + # Default-Start: 2 3 5 + # Default-Stop: + # Description: Loads/Unloads ATM drivers and starts/stops basic services + ### END INIT INFO # Source function library. ! ! # source function library ! if [ -f /etc/init.d/functions ]; then ! . /etc/init.d/functions ! alias start_daemon=daemon ! elif [ -f /etc/rc.d/init.d/functions ]; then ! . /etc/rc.d/init.d/functions ! alias start_daemon=daemon ! elif [ -f /lib/lsb/init-functions ]; then ! . /lib/lsb/init-functions ! elif [ -f /sbin/startproc ]; then ! alias start_daemon=/sbin/startproc ! else ! exit 0 ! fi ! ! if [ -f /etc/rc.status ]; then ! . /etc/rc.status ! else ! rc_reset() { RETVAL=0; } ! rc_failed() ! { ! if [ -z "$1"]; then ! RETVAL=1; ! elif [ "$1" -ne 0 ]; then ! RETVAL=$1; ! fi ! } ! rc_check() { rc_failed $?; } ! rc_exit() { exit $RETVAL; } ! rc_status() ! { ! if [ "$?" = "-v" ]; then ! [ $RETVAL -eq 0 ] && success || failure ! fi ! } ! ! fi ! rc_reset if [ ! -f /etc/sysconfig/atm ]; then ! rc_failed 6 ! rc_exit fi *************** *** 18,22 **** [ "$ATM" != yes ] && exit 0 ! cd /etc/sysconfig/network-scripts clipinterfaces=$(ls ifcfg-atm[0-9] 2> /dev/null | sed -e 's/^ifcfg-//g') --- 67,79 ---- [ "$ATM" != yes ] && exit 0 ! if [ -d /etc/sysconfig/network-scripts ]; then ! cd /etc/sysconfig/network-scripts ! elif [ -d /etc/sysconfig/network ]; then ! cd /etc/sysconfig/network ! else ! rc_failed ! rc_status -v ! rc_exit ! fi clipinterfaces=$(ls ifcfg-atm[0-9] 2> /dev/null | sed -e 's/^ifcfg-//g') *************** *** 26,39 **** case "$1" in start) ! echo -n "Starting ATM demons: " [ -z "$ATMMODULES" ] || /sbin/modprobe "$ATMMODULES" ! daemon /usr/sbin/atmsigd -b ${ATMSIGD_OPTIONS:+ $ATMSIGD_OPTIONS} ! daemon /usr/sbin/ilmid -b ${ILMID_OPTIONS:+ $ILMID_OPTIONS} ${ILMIQOS:+ -q $ILMIQOS} if [ "$IPATM" = yes ]; then ! daemon /usr/sbin/atmarpd -b -l syslog -m for i in $clipinterfaces; do /usr/sbin/atmarp -c $i done fi --- 83,100 ---- case "$1" in start) ! echo -n "Starting ATM demons" [ -z "$ATMMODULES" ] || /sbin/modprobe "$ATMMODULES" ! start_daemon /usr/sbin/atmsigd -b -u uni31 -l syslog -D /var/tmp -t 20 -c /etc/atmsigd.conf ! rc_check ! start_daemon /usr/sbin/ilmid -b -u 3.1 -l syslog ${ILMIQOS:+ -q $ILMIQOS} ! rc_check if [ "$IPATM" = yes ]; then ! start_daemon /usr/sbin/atmarpd -b -l syslog -m ! rc_check for i in $clipinterfaces; do /usr/sbin/atmarp -c $i + rc_check done fi *************** *** 43,47 **** ITF=`echo $i | sed -e 's/nas//'` ! daemon /usr/sbin/br2684ctl -b \ -c $ITF \ ${PAYLOAD:+ -p $PAYLOAD } \ --- 104,108 ---- ITF=`echo $i | sed -e 's/nas//'` ! start_daemon /usr/sbin/br2684ctl -b \ -c $ITF \ ${PAYLOAD:+ -p $PAYLOAD } \ *************** *** 49,52 **** --- 110,114 ---- ${QOS:+ -q $QOS} \ ${VPIVCI:+ -a $VPIVCI} + rc_check ) done *************** *** 57,61 **** ITF=`echo $i | sed -e 's/lec//'` ! daemon /usr/sbin/zeppelin -b \ -i $ITF -l $ITF \ ${VLAN:+ -n $VLAN} \ --- 119,123 ---- ITF=`echo $i | sed -e 's/lec//'` ! start_daemon /usr/sbin/zeppelin -b \ -i $ITF -l $ITF \ ${VLAN:+ -n $VLAN} \ *************** *** 67,77 **** ${DEBUG:+ -m $DEBUG} \ -F /var/log/${DEVICE} ) done fi touch /var/lock/subsys/atm ;; stop) ! echo -n "Stopping ATM demons: " if [ "$LANE" = yes ]; then for i in $laneinterfaces; do --- 129,142 ---- ${DEBUG:+ -m $DEBUG} \ -F /var/log/${DEVICE} + rc_check ) done fi touch /var/lock/subsys/atm + rc_status -v ;; + stop) ! echo -n "Stopping ATM demons" if [ "$LANE" = yes ]; then for i in $laneinterfaces; do *************** *** 97,105 **** [ -z "$ATMMODULES" ] || /sbin/modprobe -r "$ATMMODULES" - echo rm -f /var/lock/subsys/atm ;; *) ! echo "Usage: atm {start|stop}" exit 1 esac --- 162,177 ---- [ -z "$ATMMODULES" ] || /sbin/modprobe -r "$ATMMODULES" rm -f /var/lock/subsys/atm + rc_status -v + ;; + + restart) + $0 stop + $0 start ;; + *) ! echo "Usage: atm {start|stop|restart}" exit 1 esac + rc_exit |