107 lines
2.1 KiB
Diff
107 lines
2.1 KiB
Diff
|
diff -up radvd-1.1/redhat/radvd.init.posix radvd-1.1/redhat/radvd.init
|
||
|
--- radvd-1.1/redhat/radvd.init.posix 2009-02-02 14:20:48.000000000 +0100
|
||
|
+++ radvd-1.1/redhat/radvd.init 2009-02-02 14:28:45.000000000 +0100
|
||
|
@@ -28,12 +28,6 @@
|
||
|
|
||
|
[ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvd
|
||
|
|
||
|
-if [ "$1" == "status" ]; then
|
||
|
- [ -f /usr/sbin/radvd ] || exit 4
|
||
|
-else
|
||
|
- [ -f /usr/sbin/radvd ] || exit 1
|
||
|
-fi
|
||
|
-
|
||
|
RETVAL=0
|
||
|
PROG="radvd"
|
||
|
LOCKFILE=/var/lock/subsys/radvd
|
||
|
@@ -41,48 +35,53 @@ LOCKFILE=/var/lock/subsys/radvd
|
||
|
# See how we were called.
|
||
|
case "$1" in
|
||
|
start)
|
||
|
-
|
||
|
- # Check that networking is up.
|
||
|
- [ "${NETWORKING_IPV6}" = "yes" ] || exit 1
|
||
|
-
|
||
|
- echo -n $"Starting $PROG: "
|
||
|
- daemon radvd $OPTIONS
|
||
|
- RETVAL=$?
|
||
|
- echo
|
||
|
- [ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||
|
- ;;
|
||
|
+ if [ ! -f /etc/radvd.conf ]; then
|
||
|
+ echo "Configuration file /etc/radvd.conf missing" 1>&2
|
||
|
+ exit 6
|
||
|
+ fi
|
||
|
+ if [ ! -x /usr/sbin/radvd ]; then
|
||
|
+ echo "Insufficient privilege" 1>&2
|
||
|
+ exit 4
|
||
|
+ fi
|
||
|
+ echo -n $"Starting $prog: "
|
||
|
+ echo -n $"Starting $PROG: "
|
||
|
+ daemon radvd $OPTIONS
|
||
|
+ RETVAL=$?
|
||
|
+ echo
|
||
|
+ [ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||
|
+ ;;
|
||
|
stop)
|
||
|
- echo -n $"Stopping $PROG: "
|
||
|
- killproc radvd
|
||
|
- RETVAL=$?
|
||
|
- echo
|
||
|
- [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
|
||
|
- ;;
|
||
|
+ echo -n $"Stopping $PROG: "
|
||
|
+ killproc radvd
|
||
|
+ RETVAL=$?
|
||
|
+ echo
|
||
|
+ [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
|
||
|
+ ;;
|
||
|
status)
|
||
|
- status radvd
|
||
|
- RETVAL=$?
|
||
|
- ;;
|
||
|
+ status radvd
|
||
|
+ RETVAL=$?
|
||
|
+ ;;
|
||
|
restart)
|
||
|
- $0 stop
|
||
|
- $0 start
|
||
|
- RETVAL=$?
|
||
|
- ;;
|
||
|
+ $0 stop
|
||
|
+ $0 start
|
||
|
+ RETVAL=$?
|
||
|
+ ;;
|
||
|
reload)
|
||
|
- echo -n $"Reloading $PROG: "
|
||
|
- killproc radvd -HUP
|
||
|
- RETVAL=$?
|
||
|
- echo
|
||
|
- ;;
|
||
|
+ echo -n $"Reloading $PROG: "
|
||
|
+ killproc radvd -HUP
|
||
|
+ RETVAL=$?
|
||
|
+ echo
|
||
|
+ ;;
|
||
|
condrestart)
|
||
|
- if [ -f $LOCKFILE ]; then
|
||
|
- $0 stop
|
||
|
- $0 start
|
||
|
- RETVAL=$?
|
||
|
- fi
|
||
|
- ;;
|
||
|
+ if [ -f $LOCKFILE ]; then
|
||
|
+ $0 stop
|
||
|
+ $0 start
|
||
|
+ RETVAL=$?
|
||
|
+ fi
|
||
|
+ ;;
|
||
|
*)
|
||
|
- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
||
|
- exit 2
|
||
|
+ echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
||
|
+ exit 2
|
||
|
esac
|
||
|
|
||
|
exit $RETVAL
|