3 # $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
6 # It is not safe to start if we don't have a default configuration...
7 if [ ! -f /etc/default/dhcp-relay ]; then
8 echo "/etc/default/dhcp-relay does not exist! - Aborting..."
9 echo "create this file to fix the problem."
13 # Read init script configuration (interfaces the daemon should listen on
14 # and the DHCP server we should forward requests to.)
15 . /etc/default/dhcp-relay
17 # Build command line for interfaces (will be passed to dhrelay below.)
19 if test "$INTERFACES" != ""; then
20 for I in $INTERFACES; do
21 IFCMD=${IFCMD}"-i "${I}" "
25 DHCRELAYPID=/var/run/dhcrelay.pid
29 start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
32 start-stop-daemon -K -x /usr/sbin/dhcrelay
34 restart | force-reload)
40 echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"