5 # description: DHCP relay agent
7 # Source function library.
8 . /etc/rc.d/init.d/functions
10 # Source networking configuration.
11 . /etc/sysconfig/network
13 # Demon specified configuration.
14 . /etc/sysconfig/dhcp-relay
16 # Check that networking is up.
17 if is_no "${NETWORKING}"; then
18 msg_Network_Down "DHCP realay"
22 if [ -n "DHCP_REALY_INTERFACES" ]; then
23 OPTIONS="-i $DHCP_REALY_INTERFACES"
27 # See how we were called.
30 # Check if the service is already running?
31 if [ ! -f /var/lock/subsys/dhcp-relay ]; then
32 msg_starting "DHCP relay"
33 daemon dhcrelay $OPTIONS $DHCP_SERVERS_IP
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp-relay
37 msg_Already_Running "DHCP relay"
42 msg_stopping "DHCP relay"
44 rm -f /var/lock/subsys/dhcp-relay
54 msg_Usage "$0 {start|stop|restart|reload|status}"