Move all to deprecated folder.
This commit is contained in:
34
deprecated/firmware/buildroot/package/dhcp/Config.in
Normal file
34
deprecated/firmware/buildroot/package/dhcp/Config.in
Normal file
@@ -0,0 +1,34 @@
|
||||
config BR2_PACKAGE_DHCP
|
||||
bool "dhcp (ISC)"
|
||||
# fork()
|
||||
depends on BR2_USE_MMU
|
||||
help
|
||||
DHCP relay agent from the ISC DHCP distribution.
|
||||
|
||||
http://www.isc.org/products/DHCP
|
||||
|
||||
if BR2_PACKAGE_DHCP
|
||||
|
||||
config BR2_PACKAGE_DHCP_SERVER
|
||||
bool "dhcp server"
|
||||
help
|
||||
DHCP server from the ISC DHCP distribution.
|
||||
|
||||
config BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK
|
||||
bool "Enable delayed ACK feature"
|
||||
depends on BR2_PACKAGE_DHCP_SERVER
|
||||
help
|
||||
Enable delayed ACK feature in the ISC DHCP server.
|
||||
|
||||
config BR2_PACKAGE_DHCP_RELAY
|
||||
bool "dhcp relay"
|
||||
help
|
||||
DHCP relay agent from the ISC DHCP distribution.
|
||||
|
||||
|
||||
config BR2_PACKAGE_DHCP_CLIENT
|
||||
bool "dhcp client"
|
||||
help
|
||||
DHCP client from the ISC DHCP distribution.
|
||||
|
||||
endif
|
||||
53
deprecated/firmware/buildroot/package/dhcp/S80dhcp-relay
Executable file
53
deprecated/firmware/buildroot/package/dhcp/S80dhcp-relay
Executable file
@@ -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=""
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
CFG_FILE="/etc/default/dhcrelay"
|
||||
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
|
||||
|
||||
# Sanity checks
|
||||
test -f /usr/sbin/dhcrelay || exit 0
|
||||
test -n "$INTERFACES" || exit 0
|
||||
test -n "$SERVERS" || exit 0
|
||||
|
||||
# Build command line for interfaces (will be passed to dhrelay below.)
|
||||
IFCMD=""
|
||||
for I in $INTERFACES; do
|
||||
IFCMD=${IFCMD}"-i "${I}" "
|
||||
done
|
||||
|
||||
DHCRELAYPID=/var/run/dhcrelay.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting DHCP relay: "
|
||||
start-stop-daemon -S -q -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping DHCP relay: "
|
||||
start-stop-daemon -K -q -x /usr/sbin/dhcrelay
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart | force-reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
49
deprecated/firmware/buildroot/package/dhcp/S80dhcp-server
Executable file
49
deprecated/firmware/buildroot/package/dhcp/S80dhcp-server
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/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=""
|
||||
|
||||
# Additional options that are passed to the DHCP server daemon?
|
||||
OPTIONS=""
|
||||
|
||||
NAME="dhcpd"
|
||||
DAEMON="/usr/sbin/${NAME}"
|
||||
CFG_FILE="/etc/default/${NAME}"
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
|
||||
|
||||
# Sanity checks
|
||||
test -f /usr/sbin/dhcpd || exit 0
|
||||
test -f /etc/dhcp/dhcpd.conf || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "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 -q -x ${DAEMON} -- -q $OPTIONS $INTERFACES
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping DHCP server: "
|
||||
start-stop-daemon -K -q -x ${DAEMON}
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart | force-reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
284
deprecated/firmware/buildroot/package/dhcp/dhclient-script
Executable file
284
deprecated/firmware/buildroot/package/dhcp/dhclient-script
Executable file
@@ -0,0 +1,284 @@
|
||||
#!/bin/sh
|
||||
|
||||
# dhclient-script from OpenWRT project
|
||||
# http://git.openwrt.org/?p=packages.git;a=blob;f=net/isc-dhcp/files/dhclient-script;h=4afebc0ad20ebac51c5baae5ed01c6713e3a0fd0;hb=HEAD
|
||||
|
||||
make_resolv_conf() {
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
cat /dev/null > /etc/resolv.conf.dhclient
|
||||
chmod 644 /etc/resolv.conf.dhclient
|
||||
if [ x"$new_domain_search" != x ]; then
|
||||
echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
elif [ x"$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
done
|
||||
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
chmod 644 /etc/resolv.conf.dhclient6
|
||||
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
done
|
||||
fi
|
||||
|
||||
# if both v4 and v6 clients are running, concatenate results
|
||||
cat /etc/resolv.conf.* > /etc/resolv.conf
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
exit_with_hooks() {
|
||||
exit_status=$1
|
||||
if [ -f /etc/dhclient-exit-hooks ]; then
|
||||
. /etc/dhclient-exit-hooks
|
||||
fi
|
||||
# probably should do something with exit status of the local script
|
||||
exit $exit_status
|
||||
}
|
||||
|
||||
# Invoke the local dhcp client enter hooks, if they exist.
|
||||
if [ -f /etc/dhclient-enter-hooks ]; then
|
||||
exit_status=0
|
||||
. /etc/dhclient-enter-hooks
|
||||
# allow the local script to abort processing of this state
|
||||
# local script must set exit_status variable to nonzero.
|
||||
if [ $exit_status -ne 0 ]; then
|
||||
exit $exit_status
|
||||
fi
|
||||
fi
|
||||
|
||||
###
|
||||
### DHCPv4 Handlers
|
||||
###
|
||||
|
||||
if [ x$new_broadcast_address != x ]; then
|
||||
new_broadcast_arg="broadcast $new_broadcast_address"
|
||||
fi
|
||||
if [ x$new_subnet_mask != x ]; then
|
||||
new_subnet_arg="netmask $new_subnet_mask"
|
||||
fi
|
||||
if [ x$alias_subnet_mask != x ]; then
|
||||
alias_subnet_arg="netmask $alias_subnet_mask"
|
||||
fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
# Linux doesn't do mediums (ok, ok, media).
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xPREINIT ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
# Bring down alias interface. Its routes will disappear too.
|
||||
ifconfig $interface:0- 0.0.0.0
|
||||
fi
|
||||
ifconfig $interface 0.0.0.0 up
|
||||
|
||||
# We need to give the kernel some time to get the interface up.
|
||||
sleep 1
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
|
||||
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
|
||||
current_hostname=`hostname`
|
||||
if [ x$current_hostname = x ] || \
|
||||
[ x$current_hostname = x$old_host_name ]; then
|
||||
if [ x$current_hostname = x ] || \
|
||||
[ x$new_host_name != x$old_host_name ]; then
|
||||
hostname $new_host_name
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
|
||||
[ x$alias_ip_address != x$old_ip_address ]; then
|
||||
# Possible new alias. Remove old alias.
|
||||
ifconfig $interface:0- 0.0.0.0
|
||||
fi
|
||||
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
|
||||
# IP address changed. Bringing down the interface will delete all routes,
|
||||
# and clear the ARP cache.
|
||||
ifconfig $interface 0.0.0.0 down
|
||||
|
||||
fi
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
|
||||
ifconfig $interface $new_ip_address $new_subnet_arg \
|
||||
$new_broadcast_arg
|
||||
for router in $new_routers; do
|
||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
||||
route add -host $router dev $interface
|
||||
fi
|
||||
route add default gw $router
|
||||
done
|
||||
fi
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
|
||||
then
|
||||
ifconfig $interface:0- 0.0.0.0
|
||||
ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
|
||||
route add -host $alias_ip_address $interface:0
|
||||
fi
|
||||
make_resolv_conf
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|
||||
|| [ x$reason = xSTOP ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
# Turn off alias interface.
|
||||
ifconfig $interface:0- 0.0.0.0
|
||||
fi
|
||||
if [ x$old_ip_address != x ]; then
|
||||
# Shut down interface, which will delete routes and clear arp cache.
|
||||
ifconfig $interface 0.0.0.0 down
|
||||
fi
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
|
||||
route add -host $alias_ip_address $interface:0
|
||||
fi
|
||||
|
||||
# remove v4 dns configuration for this interface
|
||||
rm /etc/resolv.conf.dhclient
|
||||
cat /etc/resolv.conf.* > /etc/resolv.conf
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xTIMEOUT ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
ifconfig $interface:0- 0.0.0.0
|
||||
fi
|
||||
ifconfig $interface $new_ip_address $new_subnet_arg \
|
||||
$new_broadcast_arg
|
||||
set $new_routers
|
||||
if ping -q -c 1 $1; then
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && \
|
||||
[ x$alias_ip_address != x ]; then
|
||||
ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
|
||||
route add -host $alias_ip_address dev $interface:0
|
||||
fi
|
||||
for router in $new_routers; do
|
||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
||||
route add -host $router dev $interface
|
||||
fi
|
||||
route add default gw $router
|
||||
done
|
||||
make_resolv_conf
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
ifconfig $interface 0.0.0.0 down
|
||||
exit_with_hooks 1
|
||||
fi
|
||||
|
||||
###
|
||||
### DHCPv6 Handlers
|
||||
###
|
||||
|
||||
if [ x$reason = xPREINIT6 ]; then
|
||||
# Ensure interface is up.
|
||||
ifconfig ${interface} up
|
||||
|
||||
# Remove any stale addresses from aborted clients.
|
||||
ip -f inet6 addr flush dev ${interface} scope global
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then
|
||||
echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix}
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xBOUND6 ]; then
|
||||
if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
|
||||
ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
|
||||
|
||||
# Check for nameserver options.
|
||||
make_resolv_conf
|
||||
|
||||
### <<
|
||||
# Set up softwire tunnel
|
||||
if [ x${new_dhcp6_softwire} != x ] ; then
|
||||
/etc/init.d/dhclient stop
|
||||
ifconfig ${interface} 0.0.0.0
|
||||
ip -6 tunnel add tun0 mode ipip6 \
|
||||
remote ${new_dhcp6_softwire} \
|
||||
local ${new_ip6_address} \
|
||||
dev ${interface} encaplimit none
|
||||
ip link set tun0 up
|
||||
ip route add default dev tun0
|
||||
fi
|
||||
### >>
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then
|
||||
if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
|
||||
ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
|
||||
|
||||
# Make sure nothing has moved around on us.
|
||||
|
||||
# Nameservers/domains/etc.
|
||||
if [ "x${new_dhcp6_name_servers}" != "x${old_dhcp6_name_servers}" ] ||
|
||||
[ "x${new_dhcp6_domain_search}" != "x${old_dhcp6_domain_search}" ] ; then
|
||||
make_resolv_conf
|
||||
fi
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xDEPREF6 ]; then
|
||||
if [ x${new_ip6_address} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
|
||||
# Busybox ifconfig has no way to communicate this to the kernel, so ignore it
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ]; then
|
||||
if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
|
||||
ifconfig ${interface} del ${old_ip6_address}/${old_ip6_prefixlen}
|
||||
|
||||
# remove v6 dns configuration for this interface
|
||||
rm /etc/resolv.conf.dhclient6
|
||||
cat /etc/resolv.conf.* > /etc/resolv.conf
|
||||
|
||||
### <<
|
||||
# Tear down softwire tunnel
|
||||
if [ x${old_dhcp6_softwire} != x ] ; then
|
||||
ip link set tun0 down
|
||||
ip tunnel del tun0
|
||||
fi
|
||||
### >>
|
||||
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
exit_with_hooks 0
|
||||
50
deprecated/firmware/buildroot/package/dhcp/dhclient.conf
Normal file
50
deprecated/firmware/buildroot/package/dhcp/dhclient.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
# Configuration file for /sbin/dhclient, which is included in Debian's
|
||||
# dhcp3-client package.
|
||||
#
|
||||
# This is a sample configuration file for dhclient. See dhclient.conf's
|
||||
# man page for more information about the syntax of this file
|
||||
# and a more comprehensive list of the parameters understood by
|
||||
# dhclient.
|
||||
#
|
||||
# Normally, if the DHCP server provides reasonable information and does
|
||||
# not leave anything out (like the domain name, for example), then
|
||||
# few changes must be made to this file, if any.
|
||||
#
|
||||
|
||||
#send host-name "andare.fugue.com";
|
||||
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
|
||||
#send dhcp-lease-time 3600;
|
||||
#supersede domain-name "fugue.com home.vix.com";
|
||||
#prepend domain-name-servers 127.0.0.1;
|
||||
request subnet-mask, broadcast-address, time-offset, routers,
|
||||
domain-name, domain-name-servers, host-name,
|
||||
netbios-name-servers, netbios-scope;
|
||||
#require subnet-mask, domain-name-servers;
|
||||
#timeout 60;
|
||||
#retry 60;
|
||||
#reboot 10;
|
||||
#select-timeout 5;
|
||||
#initial-interval 2;
|
||||
#script "/etc/dhcp3/dhclient-script";
|
||||
#media "-link0 -link1 -link2", "link0 link1";
|
||||
#reject 192.33.137.209;
|
||||
|
||||
#alias {
|
||||
# interface "eth0";
|
||||
# fixed-address 192.5.5.213;
|
||||
# option subnet-mask 255.255.255.255;
|
||||
#}
|
||||
|
||||
#lease {
|
||||
# interface "eth0";
|
||||
# fixed-address 192.33.137.200;
|
||||
# medium "link0 link1";
|
||||
# option host-name "andare.swiftmedia.com";
|
||||
# option subnet-mask 255.255.255.0;
|
||||
# option broadcast-address 192.33.137.255;
|
||||
# option routers 192.33.137.250;
|
||||
# option domain-name-servers 127.0.0.1;
|
||||
# renew 2 2000/1/12 00:00:01;
|
||||
# rebind 2 2000/1/12 00:00:01;
|
||||
# expire 2 2000/1/12 00:00:01;
|
||||
#}
|
||||
2
deprecated/firmware/buildroot/package/dhcp/dhcp.hash
Normal file
2
deprecated/firmware/buildroot/package/dhcp/dhcp.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Verified from ftp://ftp.isc.org/isc/dhcp/4.1-ESV-R12/dhcp-4.1-ESV-R12.tar.gz.sha256.asc
|
||||
sha256 53265d1bf5e2073379df03c73a1a34d38a904307609c0f9cb77223912e753e5f dhcp-4.1-ESV-R12.tar.gz
|
||||
95
deprecated/firmware/buildroot/package/dhcp/dhcp.mk
Normal file
95
deprecated/firmware/buildroot/package/dhcp/dhcp.mk
Normal file
@@ -0,0 +1,95 @@
|
||||
################################################################################
|
||||
#
|
||||
# dhcp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DHCP_VERSION = 4.1-ESV-R12
|
||||
DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION)
|
||||
DHCP_INSTALL_STAGING = YES
|
||||
DHCP_LICENSE = ISC
|
||||
DHCP_LICENSE_FILES = LICENSE
|
||||
DHCP_CONF_ENV = \
|
||||
CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
|
||||
-D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \
|
||||
ac_cv_file__dev_random=yes
|
||||
DHCP_CONF_OPTS = \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \
|
||||
--with-srv-pid-file=/var/run/dhcpd.pid \
|
||||
--with-srv6-pid-file=/var/run/dhcpd6.pid \
|
||||
--with-cli-pid-file=/var/run/dhclient.pid \
|
||||
--with-cli6-pid-file=/var/run/dhclient6.pid \
|
||||
--with-relay-pid-file=/var/run/dhcrelay.pid \
|
||||
--with-relay6-pid-file=/var/run/dhcrelay6.pid
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
|
||||
DHCP_CONF_OPTS += --enable-delayed-ack
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
||||
define DHCP_INSTALL_SERVER
|
||||
mkdir -p $(TARGET_DIR)/var/lib
|
||||
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
||||
$(INSTALL) -m 0755 -D $(@D)/server/dhcpd $(TARGET_DIR)/usr/sbin/dhcpd
|
||||
$(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \
|
||||
$(TARGET_DIR)/etc/dhcp/dhcpd.conf
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
|
||||
define DHCP_INSTALL_RELAY
|
||||
mkdir -p $(TARGET_DIR)/var/lib
|
||||
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
||||
$(INSTALL) -m 0755 -D $(DHCP_DIR)/relay/dhcrelay \
|
||||
$(TARGET_DIR)/usr/sbin/dhcrelay
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
|
||||
define DHCP_INSTALL_CLIENT
|
||||
mkdir -p $(TARGET_DIR)/var/lib
|
||||
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
||||
$(INSTALL) -m 0755 -D $(DHCP_DIR)/client/dhclient \
|
||||
$(TARGET_DIR)/sbin/dhclient
|
||||
$(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
|
||||
$(TARGET_DIR)/etc/dhcp/dhclient.conf
|
||||
$(INSTALL) -m 0755 -D package/dhcp/dhclient-script \
|
||||
$(TARGET_DIR)/sbin/dhclient-script
|
||||
endef
|
||||
endif
|
||||
|
||||
# Options don't matter, scripts won't start if binaries aren't there
|
||||
define DHCP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server \
|
||||
$(TARGET_DIR)/etc/init.d/S80dhcp-server
|
||||
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay \
|
||||
$(TARGET_DIR)/etc/init.d/S80dhcp-relay
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
||||
define DHCP_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/dhcp/dhcpd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
|
||||
ln -sf ../../../../usr/lib/systemd/system/dhcpd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service
|
||||
|
||||
echo "d /var/lib/dhcp 0755 - - - -" > \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf
|
||||
echo "f /var/lib/dhcp/dhcpd.leases - - - - -" >> \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf
|
||||
endef
|
||||
endif
|
||||
|
||||
define DHCP_INSTALL_TARGET_CMDS
|
||||
$(DHCP_INSTALL_RELAY)
|
||||
$(DHCP_INSTALL_SERVER)
|
||||
$(DHCP_INSTALL_CLIENT)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
108
deprecated/firmware/buildroot/package/dhcp/dhcpd.conf
Normal file
108
deprecated/firmware/buildroot/package/dhcp/dhcpd.conf
Normal file
@@ -0,0 +1,108 @@
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd for Debian
|
||||
#
|
||||
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
|
||||
#
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
ddns-update-style none;
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
option domain-name "example.org";
|
||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
#subnet 10.254.239.0 netmask 255.255.255.224 {
|
||||
# range 10.254.239.10 10.254.239.20;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
#}
|
||||
|
||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
||||
# which we don't really recommend.
|
||||
|
||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
||||
# option broadcast-address 10.254.239.31;
|
||||
# option routers rtr-239-32-1.example.org;
|
||||
#}
|
||||
|
||||
# A slightly different configuration for an internal subnet.
|
||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
||||
# range 10.5.5.26 10.5.5.30;
|
||||
# option domain-name-servers ns1.internal.example.org;
|
||||
# option domain-name "internal.example.org";
|
||||
# option routers 10.5.5.1;
|
||||
# option broadcast-address 10.5.5.31;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in
|
||||
# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.fugue.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
#host fantasia {
|
||||
# hardware ethernet 08:00:07:26:c0:a5;
|
||||
# fixed-address fantasia.fugue.com;
|
||||
#}
|
||||
|
||||
# You can declare a class of clients and then do address allocation
|
||||
# based on that. The example below shows a case where all clients
|
||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
||||
# other clients get addresses on the 10.0.29/24 subnet.
|
||||
|
||||
#class "foo" {
|
||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
||||
#}
|
||||
|
||||
#shared-network 224-29 {
|
||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-224.example.org;
|
||||
# }
|
||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-29.example.org;
|
||||
# }
|
||||
# pool {
|
||||
# allow members of "foo";
|
||||
# range 10.17.224.10 10.17.224.250;
|
||||
# }
|
||||
# pool {
|
||||
# deny members of "foo";
|
||||
# range 10.0.29.10 10.0.29.230;
|
||||
# }
|
||||
#}
|
||||
13
deprecated/firmware/buildroot/package/dhcp/dhcpd.service
Normal file
13
deprecated/firmware/buildroot/package/dhcp/dhcpd.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=DHCP server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/dhcpd.pid
|
||||
ExecStart=/usr/sbin/dhcpd -q -pf /run/dhcpd.pid $OPTIONS $INTERFACES
|
||||
KillSignal=SIGINT
|
||||
EnvironmentFile=-/etc/default/dhcpd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user