]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp-relay.init
- updated to rc-scripts 0.2.0
[packages/dhcp.git] / dhcp-relay.init
1 #!/bin/sh
2 # DHCP Server
3 #
4 # chkconfig:    345 80 20
5 # description:  DHCP Relay
6
7 # Source function library.
8 . /etc/rc.d/init.d/functions
9
10 # Source networking configuration.
11 . /etc/sysconfig/network
12
13 # Demon specified configuration.
14 . /etc/sysconfig/dhcp-relay
15
16 # Check that networking is up.
17 if is_no "${NETWORKING}"; then
18         msg_Network_Down "DHCP Realay"
19         exit 1
20 fi
21
22 # See how we were called.
23 case "$1" in
24   start)
25         msg_starting "DHCP Relay"
26         daemon dhcrelay $DHCP_SERVERS
27         touch /var/lock/subsys/dhcrelay
28         ;;
29   stop)
30         msg_stopping "DHCP Relay"
31         killproc dhcrelay
32         rm -f /var/lock/subsys/dhcrelay
33         ;;
34   restart)
35         $0 stop
36         $0 start
37         ;;
38   status)
39         status dhcrelay
40         ;;
41   *)
42         msg_Usage "$0 {start|stop|restart|status}"
43         exit 1
44 esac
45
46 exit 0
47
This page took 0.099433 seconds and 3 git commands to generate.