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_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network ]; then
19 msg_network_down "DHCP realay"
26 if [ -n "DHCP_REALY_INTERFACES" ]; then
27 OPTIONS="-i $DHCP_REALY_INTERFACES"
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/dhcp-relay ]; then
36 msg_starting "DHCP relay"
37 daemon dhcrelay $OPTIONS $DHCP_SERVERS_IP
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp-relay
41 msg_already_running "DHCP relay"
45 if [ -f /var/lock/subsys/dhcp-relay ]; then
46 msg_stopping "DHCP relay"
48 rm -f /var/lock/subsys/dhcp-relay
50 msg_not_running "DHCP relay"
63 msg_usage "$0 {start|stop|restart|force-reload|status}"