mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-24 14:03:29 +08:00
Update init scripts a bit. Don't mess with /etc/default for now.
This commit is contained in:
parent
74ad4e12c8
commit
07064c0978
@ -1,12 +0,0 @@
|
|||||||
# Defaults for dhcp-relay initscript
|
|
||||||
# sourced by /etc/init.d/dhcp-relay
|
|
||||||
|
|
||||||
# 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=""
|
|
@ -1,7 +0,0 @@
|
|||||||
# Defaults for dhcp initscript
|
|
||||||
# sourced by /etc/init.d/dhcp-server
|
|
||||||
# installed at /etc/default/dhcp-server by the maintainer scripts
|
|
||||||
|
|
||||||
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
|
|
||||||
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
|
|
||||||
INTERFACES=""
|
|
@ -3,16 +3,25 @@
|
|||||||
# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
|
# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
# It is not safe to start if we don't have a default configuration...
|
|
||||||
if [ ! -f /etc/default/dhcp-relay ]; then
|
|
||||||
echo "/etc/default/dhcp-relay does not exist! - Aborting..."
|
|
||||||
echo "create this file to fix the problem."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Read init script configuration (interfaces the daemon should listen on
|
# What servers should the DHCP relay forward requests to?
|
||||||
# and the DHCP server we should forward requests to.)
|
# e.g: SERVERS="192.168.0.1"
|
||||||
. /etc/default/dhcp-relay
|
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.)
|
# Build command line for interfaces (will be passed to dhrelay below.)
|
||||||
IFCMD=""
|
IFCMD=""
|
||||||
|
@ -3,17 +3,21 @@
|
|||||||
# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
|
# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
test -f /usr/sbin/dhcpd || exit 0
|
|
||||||
|
|
||||||
|
# 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...
|
# It is not safe to start if we don't have a default configuration...
|
||||||
if [ ! -f /etc/default/dhcp-server ]; then
|
echo "/etc/init.d/dhcp-server not yet configured! - Aborting..."
|
||||||
echo "/etc/default/dhcp-server does not exist! - Aborting..."
|
exit 1;
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
test -f /usr/sbin/dhcpd || exit 0
|
||||||
|
|
||||||
# Read init script configuration (so far only interfaces the daemon
|
|
||||||
# should listen on.)
|
|
||||||
. /etc/default/dhcp-server
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#Defaults for tftpd-hpa
|
|
||||||
RUN_DAEMON="yes"
|
|
||||||
OPTIONS="-l -s /var/lib/tftpboot"
|
|
@ -3,6 +3,17 @@
|
|||||||
# Author: Jaakko Niemi <liiwi@iki.fi>
|
# Author: Jaakko Niemi <liiwi@iki.fi>
|
||||||
# Modified from skeleton file in sarge
|
# Modified from skeleton file in sarge
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Defaults for tftpd-hpa
|
||||||
|
RUN_DAEMON="yes"
|
||||||
|
OPTIONS="-l -s /var/lib/tftpboot"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
@ -10,19 +21,14 @@ DESC="HPA's tftpd"
|
|||||||
NAME=in.tftpd
|
NAME=in.tftpd
|
||||||
DAEMON=/usr/sbin/$NAME
|
DAEMON=/usr/sbin/$NAME
|
||||||
PIDFILE=/var/run/$NAME.pid
|
PIDFILE=/var/run/$NAME.pid
|
||||||
SCRIPTNAME=/etc/init.d/tftpd-hpa
|
SCRIPTNAME=/etc/init.d/S80tftpd-hpa
|
||||||
|
|
||||||
# Gracefully exit if the package has been removed.
|
# Gracefully exit if the package has been removed.
|
||||||
test -x $DAEMON || exit 0
|
test -x $DAEMON || exit 0
|
||||||
|
|
||||||
# Read config file if it is present.
|
|
||||||
if [ -r /etc/default/tftpd-hpa ]
|
|
||||||
then
|
|
||||||
. /etc/default/tftpd-hpa
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RUN_DAEMON" = "yes" ] ; then
|
if [ "$RUN_DAEMON" != "yes" ] ; then
|
||||||
echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
|
echo "tftpd-hpa disabled in /etc/init.d/S80tftpd-hpa"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user