From 6b00c90d709a01822027fb9986ec8ace605dd991 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Wed, 9 May 2007 22:48:41 +0000 Subject: Rename all INIT scripts to have the numerical prefixes to easily see the start-up order. --- package/dhcp/S80dhcp-relay | 53 +++++++++++++++++++++++++++++++++++++++++++++ package/dhcp/S80dhcp-server | 48 ++++++++++++++++++++++++++++++++++++++++ package/dhcp/dhcp.mk | 4 ++-- package/dhcp/init-relay | 53 --------------------------------------------- package/dhcp/init-server | 48 ---------------------------------------- 5 files changed, 103 insertions(+), 103 deletions(-) create mode 100755 package/dhcp/S80dhcp-relay create mode 100755 package/dhcp/S80dhcp-server delete mode 100755 package/dhcp/init-relay delete mode 100755 package/dhcp/init-server (limited to 'package/dhcp') diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay new file mode 100755 index 000000000..c870ea7f5 --- /dev/null +++ b/package/dhcp/S80dhcp-relay @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ +# + + +# What servers should the DHCP relay forward requests to? +# e.g: SERVERS="192.168.0.1" +SERVERS="" + +# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests? +INTERFACES="" + +# Additional options that are passed to the DHCP relay daemon? +OPTIONS="" + + + + +# It is not safe to start if we don't have a default configuration... +echo "/etc/init.d/dhcp-relay not yet configured! - Aborting..." +exit 1; + + + +# Build command line for interfaces (will be passed to dhrelay below.) +IFCMD="" +if test "$INTERFACES" != ""; then + for I in $INTERFACES; do + IFCMD=${IFCMD}"-i "${I}" " + done +fi + +DHCRELAYPID=/var/run/dhcrelay.pid + +case "$1" in + start) + start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + ;; + stop) + start-stop-daemon -K -x /usr/sbin/dhcrelay + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server new file mode 100755 index 000000000..7c7f893a1 --- /dev/null +++ b/package/dhcp/S80dhcp-server @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ +# + + + +# On what interfaces should the DHCP server (dhcpd) serve DHCP requests? +# Separate multiple interfaces with spaces, e.g. "eth0 eth1". +INTERFACES="" + + +# It is not safe to start if we don't have a default configuration... +echo "/etc/init.d/dhcp-server not yet configured! - Aborting..." +exit 1; + + + +test -f /usr/sbin/dhcpd || exit 0 + + +case "$1" in + start) + echo -n "Starting DHCP server: " + test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ + test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases + start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES + echo "." + ;; + stop) + echo -n "Stopping DHCP server: dhcpd3" + start-stop-daemon -K -x /usr/sbin/dhcpd + echo "." + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + if [ "$?" != "0" ]; then + exit 1 + fi + ;; + *) + echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index 75fd554b2..ec219e737 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -43,7 +43,7 @@ $(DHCP_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_DIR)/.configured $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY) (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_SERVER_BINARY) $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY) - $(INSTALL) -m 0755 -D package/dhcp/init-server $(TARGET_DIR)/etc/init.d/S80dhcp-server + $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server $(TARGET_DIR)/etc/init.d $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf $(TARGET_DIR)/etc/dhcp/dhcpd.conf rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc @@ -51,7 +51,7 @@ $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY) (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY) - $(INSTALL) -m 0755 -D package/dhcp/init-relay $(TARGET_DIR)/etc/init.d/S80dhcp-relay + $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay $(TARGET_DIR)/etc/init.d rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc diff --git a/package/dhcp/init-relay b/package/dhcp/init-relay deleted file mode 100755 index c870ea7f5..000000000 --- a/package/dhcp/init-relay +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ -# - - -# What servers should the DHCP relay forward requests to? -# e.g: SERVERS="192.168.0.1" -SERVERS="" - -# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests? -INTERFACES="" - -# Additional options that are passed to the DHCP relay daemon? -OPTIONS="" - - - - -# It is not safe to start if we don't have a default configuration... -echo "/etc/init.d/dhcp-relay not yet configured! - Aborting..." -exit 1; - - - -# Build command line for interfaces (will be passed to dhrelay below.) -IFCMD="" -if test "$INTERFACES" != ""; then - for I in $INTERFACES; do - IFCMD=${IFCMD}"-i "${I}" " - done -fi - -DHCRELAYPID=/var/run/dhcrelay.pid - -case "$1" in - start) - start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS - ;; - stop) - start-stop-daemon -K -x /usr/sbin/dhcrelay - ;; - restart | force-reload) - $0 stop - sleep 2 - $0 start - ;; - *) - echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}" - exit 1 -esac - -exit 0 diff --git a/package/dhcp/init-server b/package/dhcp/init-server deleted file mode 100755 index 7c7f893a1..000000000 --- a/package/dhcp/init-server +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ -# - - - -# On what interfaces should the DHCP server (dhcpd) serve DHCP requests? -# Separate multiple interfaces with spaces, e.g. "eth0 eth1". -INTERFACES="" - - -# It is not safe to start if we don't have a default configuration... -echo "/etc/init.d/dhcp-server not yet configured! - Aborting..." -exit 1; - - - -test -f /usr/sbin/dhcpd || exit 0 - - -case "$1" in - start) - echo -n "Starting DHCP server: " - test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ - test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases - start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES - echo "." - ;; - stop) - echo -n "Stopping DHCP server: dhcpd3" - start-stop-daemon -K -x /usr/sbin/dhcpd - echo "." - ;; - restart | force-reload) - $0 stop - sleep 2 - $0 start - if [ "$?" != "0" ]; then - exit 1 - fi - ;; - *) - echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}" - exit 1 -esac - -exit 0 -- cgit v1.2.3