1#!/bin/bash 2# chkconfig: - 16 84 3# config: /etc/quagga/isisd.conf 4 5### BEGIN INIT INFO 6# Provides: isisd 7# Short-Description: IS-IS routing engine 8# Description: IS-IS routing engine for use with Zebra 9### END INIT INFO 10 11# source function library 12. /etc/rc.d/init.d/functions 13 14# Get network config 15. /etc/sysconfig/network 16 17# quagga command line options 18. /etc/sysconfig/quagga 19 20RETVAL=0 21PROG="isisd" 22cmd=isisd 23LOCK_FILE=/var/lock/subsys/isisd 24CONF_FILE=/etc/quagga/isisd.conf 25 26case "$1" in 27 start) 28 # Check that networking is up. 29 [ "${NETWORKING}" = "no" ] && exit 1 30 31 # The process must be configured first. 32 [ -f $CONF_FILE ] || exit 6 33 if [ `id -u` -ne 0 ]; then 34 echo $"Insufficient privilege" 1>&2 35 exit 4 36 fi 37 38 echo -n $"Starting $PROG: " 39 daemon $cmd -d $ISISD_OPTS -f $CONF_FILE 40 RETVAL=$? 41 [ $RETVAL -eq 0 ] && touch $LOCK_FILE 42 echo 43 ;; 44 stop) 45 echo -n $"Shutting down $PROG: " 46 killproc $cmd 47 RETVAL=$? 48 [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE 49 echo 50 ;; 51 restart|reload|force-reload) 52 $0 stop 53 $0 start 54 RETVAL=$? 55 ;; 56 condrestart|try-restart) 57 if [ -f $LOCK_FILE ]; then 58 $0 stop 59 $0 start 60 fi 61 RETVAL=$? 62 ;; 63 status) 64 status $cmd 65 RETVAL=$? 66 ;; 67 *) 68 echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}" 69 exit 2 70esac 71 72exit $RETVAL 73