# Check that networking is up.
if is_yes "${NETWORKING}"; then
- if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
- msg_network_down DHCP6C
- exit 1
- fi
- else
- exit 0
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down DHCP6C
+ exit 1
+ fi
+else
+ exit 0
fi
RETVAL=0
case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/dhcp6c ]; then
- msg_starting "DHCP6C"
- daemon dhcp6c $DHCP6CIF
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp6c
- else
- msg_already_running DHCP6C
- fi
- ;;
+ start)
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/dhcp6c ]; then
+ msg_starting "DHCP6C"
+ daemon dhcp6c $DHCP6CIF
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp6c
+ else
+ msg_already_running DHCP6C
+ fi
+ ;;
stop)
- if [ -f /var/lock/subsys/dhcp6c ]; then
- msg_stopping "DHCP6C Server"
- killproc dhcp6c
- rm -f /var/run/dhcp6c.pid /var/lock/subsys/dhcp6c >/dev/null 2>&1
- else
- msg_not_running DHCP6C
- fi
- ;;
- restart|reload)
- $0 stop
- $0 start
- exit $?
- ;;
+ if [ -f /var/lock/subsys/dhcp6c ]; then
+ msg_stopping "DHCP6C Server"
+ killproc dhcp6c
+ rm -f /var/run/dhcp6c.pid /var/lock/subsys/dhcp6c >/dev/null 2>&1
+ else
+ msg_not_running DHCP6C
+ fi
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ exit $?
+ ;;
status)
- status dhcp6c
- exit $?
- ;;
+ status dhcp6c
+ exit $?
+ ;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
- exit 3
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
esac
exit $RETVAL
# Check that networking is up.
if is_yes "${NETWORKING}"; then
- if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
- msg_network_down DHCP6S
- exit 1
- fi
- else
- exit 0
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down DHCP6S
+ exit 1
+ fi
+else
+ exit 0
fi
RETVAL=0
case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/dhcp6s ]; then
- msg_starting "DHCP6S"
- daemon dhcp6s $DHCP6SIF
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp6s
- else
- msg_already_running DHCP6S
- fi
- ;;
+ start)
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/dhcp6s ]; then
+ msg_starting "DHCP6S"
+ daemon dhcp6s $DHCP6SIF
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp6s
+ else
+ msg_already_running DHCP6S
+ fi
+ ;;
stop)
- if [ -f /var/lock/subsys/dhcp6s ]; then
- msg_stopping "DHCP6S Server"
- killproc dhcp6s
- rm -f /var/run/dhcp6s.pid /var/lock/subsys/dhcp6s >/dev/null 2>&1
- else
- msg_not_running DHCP6S
- fi
- ;;
- restart|reload)
- $0 stop
- $0 start
- exit $?
- ;;
+ if [ -f /var/lock/subsys/dhcp6s ]; then
+ msg_stopping "DHCP6S Server"
+ killproc dhcp6s
+ rm -f /var/run/dhcp6s.pid /var/lock/subsys/dhcp6s >/dev/null 2>&1
+ else
+ msg_not_running DHCP6S
+ fi
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ exit $?
+ ;;
status)
- status dhcp6s
- exit $?
- ;;
+ status dhcp6s
+ exit $?
+ ;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
- exit 3
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
esac
exit $RETVAL