Search
j0ke.net Open Build Service
>
Projects
>
server:network
>
wide-dhcpv6
> dhcp6r.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File dhcp6r.init of Package wide-dhcpv6
#!/bin/sh # ### BEGIN INIT INFO # Provides: dhcp6r # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs # Short-Description: Start and stop the DHCPv6 relay agent # Description: dhcp6r acts as a DHCPv6 relay agent forwarding DHCPv6 messages # from clients to servers and vice versa. ### END INIT INFO # # The fields below are left around for legacy tools (will remove later). # # chkconfig: - 66 36 # description: dhcp6r acts as a DHCPv6 relay agent forwarding DHCPv6 messages \ # from clients to servers and vice versa. # processname: dhcp6r # config: /etc/sysconfig/network/dhcp6r . /etc/rc.status rc_reset RETVAL=0 prog=dhcp6r dhcp6r=/usr/sbin/dhcp6r lockfile=/var/lock/subsys/dhcp6r start() { # return 5 if program is not installed [ -x $dhcp6r ] || return 5 # return 6 if program is not configured [ -f /etc/sysconfig/network/dhcp6r ] || return 6 . /etc/sysconfig/network/dhcp6r echo -n $"Starting $prog: " startproc $dhcp6r $DHCP6RARGS RETVAL=$? [ $RETVAL -eq 0 ] && touch $lockfile return $RETVAL } stop() { echo -n $"Shutting down $prog: " killproc $dhcp6r RETVAL=$? rm -f $lockfile return $RETVAL } # See how we were called. case "$1" in start) start rc_status -v ;; stop) stop rc_status -v ;; restart|force-reload) [ -f $lockfile ] && stop start rc_status -v ;; try-restart|reload) rc_failed 3 rc_status -v ;; condrestart) if [ -f $lockfile ]; then stop && start rc_status -v else rc_status -s fi ;; status) checkproc $dhcp6r rc_status -v ;; *) echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" rc_failed 3 ;; esac rc_exit