Diff for /embedaddon/quagga/redhat/ripngd.init between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 17:26:12 version 1.1.1.2, 2012/10/09 09:22:29
Line 1 Line 1
 #!/bin/bash  #!/bin/bash
## chkconfig: - 16 84
# chkconfig: 2345 16 84 
# description: A RIP routing engine for use with Zebra and IPv6 
# 
# processname: ripngd 
 # config: /etc/quagga/ripngd.conf  # config: /etc/quagga/ripngd.conf
   
   ### BEGIN INIT INFO
   # Provides: ripngd
   # Short-Description: RIP routing engine for IPv6
   # Description: RIP routing engine for use with Zebra and IPv6
   ### END INIT INFO
   
 # source function library  # source function library
 . /etc/rc.d/init.d/functions  . /etc/rc.d/init.d/functions
   
Line 15 Line 17
 # quagga command line options  # quagga command line options
 . /etc/sysconfig/quagga  . /etc/sysconfig/quagga
   
 # Check that networking is up.  
 [ "${NETWORKING_IPV6}" = "no" ] && exit 0  
   
 # The process must be configured first.  
 [ -f /etc/quagga/ripngd.conf ] || exit 0  
   
 RETVAL=0  RETVAL=0
prog="ripngd"PROG="ripngd"
 cmd=ripngd
 LOCK_FILE=/var/lock/subsys/ripngd
 CONF_FILE=/etc/quagga/ripngd.conf
   
 case "$1" in  case "$1" in
   start)    start)
        echo -n $"Starting $prog: "        # Check that networking is up.
        daemon /usr/sbin/ripngd -d $RIPNGD_OPTS        [ "${NETWORKING}" = "no" ] && exit 1
 
         # The process must be configured first.
         [ -f $CONF_FILE ] || exit 6
         if [ `id -u` -ne 0 ]; then
                 echo $"Insufficient privilege" 1>&2
                 exit 4
         fi
 
         echo -n $"Starting $PROG: "
         daemon $cmd -d $RIPNGD_OPTS -f $CONF_FILE
         RETVAL=$?          RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ripngd        [ $RETVAL -eq 0 ] && touch $LOCK_FILE
         echo          echo
         ;;          ;;
   stop)    stop)
        echo -n $"Shutting down $prog: "        echo -n $"Shutting down $PROG: "
        killproc ripngd        killproc $cmd
         RETVAL=$?          RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ripngd        [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
         echo          echo
         ;;          ;;
  restart|reload)  restart|reload|force-reload)
        $0 stop        $0 stop
        $0 start        $0 start
         RETVAL=$?          RETVAL=$?
        ;;        ;;
  condrestart)  condrestart|try-restart)
        if [ -f /var/lock/subsys/ripngd ]; then        if [ -f $LOCK_FILE ]; then
                $0 stop                $0 stop
                 $0 start                  $0 start
        fi        fi
         RETVAL=$?          RETVAL=$?
        ;;        ;;
   status)    status)
        status ripngd        status $cmd
         RETVAL=$?          RETVAL=$?
        ;;        ;;
   *)    *)
        echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"        echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"
        exit 1        exit 2
 esac  esac
   
 exit $RETVAL  exit $RETVAL

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>