]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp-relay.init
8d84757ac05323d06ddfcd3f29f6dbbdd9b023b6
[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 if [ -n "DHCP_REALY_INTERFACES" ]; then
23         OPTIONS="-i $DHCP_REALY_INTERFACES"
24 fi
25
26
27 # See how we were called.
28 case "$1" in
29   start)
30         msg_starting "DHCP Relay"
31         daemon dhcrelay $OPTIONS $DHCP_SERVERS_IP
32         touch /var/lock/subsys/dhcrelay
33         ;;
34   stop)
35         msg_stopping "DHCP Relay"
36         killproc dhcrelay
37         rm -f /var/lock/subsys/dhcrelay
38         ;;
39   restart)
40         $0 stop
41         $0 start
42         ;;
43   status)
44         status dhcrelay
45         ;;
46   *)
47         msg_Usage "$0 {start|stop|restart|status}"
48         exit 1
49 esac
50
51 exit 0
52
This page took 0.097413 seconds and 3 git commands to generate.