summaryrefslogtreecommitdiff
path: root/testing/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/dhcp')
-rw-r--r--testing/dhcp/PKGBUILD93
-rw-r--r--testing/dhcp/dhclient-script-pathFixes.patch136
-rw-r--r--testing/dhcp/dhcp10
-rw-r--r--testing/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch39
-rw-r--r--testing/dhcp/dhcp.conf.d6
-rw-r--r--testing/dhcp/dhcp.install18
-rw-r--r--testing/dhcp/dhcp457
-rw-r--r--testing/dhcp/dhcp657
-rwxr-xr-xtesting/dhcp/dhcpd40
-rw-r--r--testing/dhcp/dhcpd4.service13
-rw-r--r--testing/dhcp/dhcpd6.service13
11 files changed, 0 insertions, 482 deletions
diff --git a/testing/dhcp/PKGBUILD b/testing/dhcp/PKGBUILD
deleted file mode 100644
index 31ace7328..000000000
--- a/testing/dhcp/PKGBUILD
+++ /dev/null
@@ -1,93 +0,0 @@
-# $Id: PKGBUILD 165396 2012-08-17 23:27:19Z heftig $
-# Maintainer: Daniel Isenmann <daniel @archlinux.org>
-
-pkgbase=dhcp
-pkgname=('dhcp' 'dhclient')
-
-# separate patch levels with a period to maintain proper versioning.
-pkgver=4.2.4.1
-_pkgver=4.2.4-P1
-
-pkgrel=2
-arch=('i686' 'x86_64')
-license=('custom:isc-dhcp')
-url="https://www.isc.org/software/dhcp"
-makedepends=('bash' 'iproute2' 'net-tools')
-source=(ftp://ftp.isc.org/isc/${pkgbase}/${_pkgver}/${pkgbase}-${_pkgver}.tar.gz{,.asc}
- dhcp4 dhcp6 dhcp dhcpd4.service dhcpd6.service
- dhcp-4.1.1-missing-ipv6-not-fatal.patch
- dhclient-script-pathFixes.patch)
-md5sums=('0ca7181024651f6323951d5498c8020b'
- '0dfe000dd88555ea06b282ae5e574d5f'
- 'c49b1497837ba56c54e401a66e1bab9b'
- '12c2f3ae47ed23eb698eb7f1bfd80f20'
- '8f357e46e1efcbb746f38737a3f977a2'
- '1076444f22e13eb5f6bff7821fd0f446'
- '9310f2d8b1d7e97ace06d68cb41d9998'
- 'fd64aeb4f399dcc41ea43089a3811094'
- '541b415a25a169eaf64b681405f79a80')
-
-build() {
- cd "${srcdir}/${pkgbase}-${_pkgver}"
-
- # Define _GNU_SOURCE to fix IPV6.
- sed '/^CFLAGS="$CFLAGS/ s/INGS"/INGS -D_GNU_SOURCE"/' -i configure
-
- # Make not having ipv6 non-fatal.
- patch -Np0 -i "${srcdir}/dhcp-4.1.1-missing-ipv6-not-fatal.patch"
-
- ./configure --prefix=/usr --sysconfdir=/etc \
- --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
- --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
- --with-cli-lease-file=/var/state/dhclient/dhclient.leases \
- --with-cli6-lease-file=/var/state/dhclient/dhclient6.leases
-
- make
-
- patch -i "${srcdir}/dhclient-script-pathFixes.patch" client/scripts/linux
-}
-
-package_dhcp(){
- pkgdesc="A DHCP server, client, and relay agent"
- depends=('openssl>=0.9.8a')
- backup=('etc/dhcpd.conf' 'etc/conf.d/dhcp')
- install=dhcp.install
-
- cd "${srcdir}/${pkgbase}-${_pkgver}"
- make DESTDIR="${pkgdir}" install
-
- install -D -m755 "${srcdir}/dhcp4" "${pkgdir}/etc/rc.d/dhcp4"
- install -D -m755 "${srcdir}/dhcp6" "${pkgdir}/etc/rc.d/dhcp6"
- install -D -m644 "${srcdir}/dhcp" "${pkgdir}/etc/conf.d/${pkgbase}"
- install -d "${pkgdir}/var/state/dhcp"
-
- install -D -m644 "${srcdir}/dhcpd4.service" "${pkgdir}/usr/lib/systemd/system/dhcpd4.service"
- install -D -m644 "${srcdir}/dhcpd6.service" "${pkgdir}/usr/lib/systemd/system/dhcpd6.service"
- ln -s dhcpd4.service "${pkgdir}/usr/lib/systemd/system/dhcp4.service"
- ln -s dhcpd6.service "${pkgdir}/usr/lib/systemd/system/dhcp6.service"
-
- # Remove dhclient
- make -C client DESTDIR="${pkgdir}" uninstall
-
- # install license
- install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhcp/LICENSE"
-}
-
-package_dhclient(){
- pkgdesc="A standalone DHCP client from the dhcp package"
- depends=('bash' 'iproute2' 'net-tools')
-
- cd "${srcdir}/${pkgbase}-${_pkgver}"
- make -C client DESTDIR="${pkgdir}" install
-
- # move dhclient.conf to dhclient.conf.example
- mv "${pkgdir}"/etc/dhclient.conf{,.example}
-
- install -d "${pkgdir}/var/state/dhclient"
-
- # install dhclient linux script
- install -m755 -D client/scripts/linux "${pkgdir}/sbin/dhclient-script"
-
- # install license
- install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhclient/LICENSE"
-}
diff --git a/testing/dhcp/dhclient-script-pathFixes.patch b/testing/dhcp/dhclient-script-pathFixes.patch
deleted file mode 100644
index a4143ddde..000000000
--- a/testing/dhcp/dhclient-script-pathFixes.patch
+++ /dev/null
@@ -1,136 +0,0 @@
---- linux 2011-05-18 20:01:54.000000000 +0000
-+++ linux_new 2011-12-21 18:45:41.487171012 +0000
-@@ -23,7 +23,7 @@
- # of the $1 in its args.
-
- # 'ip' just looks too weird. /sbin/ip looks less weird.
--ip=/sbin/ip
-+ip=/usr/sbin/ip
-
- make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
-@@ -122,9 +122,9 @@
- if [ x$reason = xPREINIT ]; then
- if [ x$alias_ip_address != x ]; then
- # Bring down alias interface. Its routes will disappear too.
-- ifconfig $interface:0- inet 0
-+ /sbin/ifconfig $interface:0- inet 0
- fi
-- ifconfig $interface 0 up
-+ /sbin/ifconfig $interface 0 up
-
- # We need to give the kernel some time to get the interface up.
- sleep 1
-@@ -151,25 +151,25 @@
- 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- inet 0
-+ /sbin/ifconfig $interface:0- inet 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 inet 0 down
-+ /sbin/ifconfig $interface inet 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 inet $new_ip_address $new_subnet_arg \
-+ /sbin/ifconfig $interface inet $new_ip_address $new_subnet_arg \
- $new_broadcast_arg $mtu_arg
- # Add a network route to the computed network address.
- for router in $new_routers; do
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-+ /sbin/route add -host $router dev $interface
- fi
-- route add default gw $router $metric_arg dev $interface
-+ /sbin/route add default gw $router $metric_arg dev $interface
- done
- else
- # we haven't changed the address, have we changed other options
-@@ -177,21 +177,21 @@
- if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
- # if we've changed routers delete the old and add the new.
- for router in $old_routers; do
-- route del default gw $router
-+ /sbin/route del default gw $router
- done
- for router in $new_routers; do
- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
-- route add -host $router dev $interface
-+ /sbin/route add -host $router dev $interface
- fi
-- route add default gw $router $metric_arg dev $interface
-+ /sbin/route add default gw $router $metric_arg dev $interface
- done
- fi
- fi
- if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
- then
-- ifconfig $interface:0- inet 0
-- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address $interface:0
-+ /sbin/ifconfig $interface:0- inet 0
-+ /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-+ /sbin/route add -host $alias_ip_address $interface:0
- fi
- make_resolv_conf
- exit_with_hooks 0
-@@ -201,42 +201,42 @@
- || [ x$reason = xSTOP ]; then
- if [ x$alias_ip_address != x ]; then
- # Turn off alias interface.
-- ifconfig $interface:0- inet 0
-+ /sbin/ifconfig $interface:0- inet 0
- fi
- if [ x$old_ip_address != x ]; then
- # Shut down interface, which will delete routes and clear arp cache.
-- ifconfig $interface inet 0 down
-+ /sbin/ifconfig $interface inet 0 down
- fi
- if [ x$alias_ip_address != x ]; then
-- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address $interface:0
-+ /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-+ /sbin/route add -host $alias_ip_address $interface:0
- fi
- exit_with_hooks 0
- fi
-
- if [ x$reason = xTIMEOUT ]; then
- if [ x$alias_ip_address != x ]; then
-- ifconfig $interface:0- inet 0
-+ /sbin/ifconfig $interface:0- inet 0
- fi
-- ifconfig $interface inet $new_ip_address $new_subnet_arg \
-+ /sbin/ifconfig $interface inet $new_ip_address $new_subnet_arg \
- $new_broadcast_arg $mtu_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 inet $alias_ip_address $alias_subnet_arg
-- route add -host $alias_ip_address dev $interface:0
-+ /sbin/ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-+ /sbin/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
-+ /sbin/route add -host $router dev $interface
- fi
-- route add default gw $router $metric_arg dev $interface
-+ /sbin/route add default gw $router $metric_arg dev $interface
- done
- make_resolv_conf
- exit_with_hooks 0
- fi
-- ifconfig $interface inet 0 down
-+ /sbin/ifconfig $interface inet 0 down
- exit_with_hooks 1
- fi
-
diff --git a/testing/dhcp/dhcp b/testing/dhcp/dhcp
deleted file mode 100644
index d4f228d9c..000000000
--- a/testing/dhcp/dhcp
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Arguments to be passed to the DHCP server daemon
-#
-
-# ipv4 runtime parameters
-DHCP4_ARGS="-q"
-
-# ipv6 runtime parameters
-DHCP6_ARGS="-q"
-
diff --git a/testing/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch b/testing/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch
deleted file mode 100644
index cc5ddb843..000000000
--- a/testing/dhcp/dhcp-4.1.1-missing-ipv6-not-fatal.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- common/discover.c 2009-09-29 21:44:49.000000000 +0200
-+++ common/discover.c_new 2010-06-30 19:40:02.000000000 +0200
-@@ -443,7 +443,7 @@
- }
-
- #ifdef DHCPv6
-- if (local_family == AF_INET6) {
-+ if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
-@@ -454,6 +454,8 @@
- ifaces->fp = NULL;
- return 0;
- }
-+ } else {
-+ ifaces->fp6 = NULL;
- }
- #endif
-
-@@ -721,7 +723,7 @@
- return 1;
- }
- #ifdef DHCPv6
-- if (!(*err)) {
-+ if (!(*err) && ifaces->fp6) {
- if (local_family == AF_INET6)
- return next_iface6(info, err, ifaces);
- }
-@@ -740,7 +742,8 @@
- ifaces->sock = -1;
- #ifdef DHCPv6
- if (local_family == AF_INET6) {
-- fclose(ifaces->fp6);
-+ if(ifaces->fp6)
-+ fclose(ifaces->fp6);
- ifaces->fp6 = NULL;
- }
- #endif
diff --git a/testing/dhcp/dhcp.conf.d b/testing/dhcp/dhcp.conf.d
deleted file mode 100644
index 99ba6d13d..000000000
--- a/testing/dhcp/dhcp.conf.d
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Arguments to be passed to the DHCP server daemon
-#
-
-DHCP_ARGS="-q"
-
diff --git a/testing/dhcp/dhcp.install b/testing/dhcp/dhcp.install
deleted file mode 100644
index 5302be4b5..000000000
--- a/testing/dhcp/dhcp.install
+++ /dev/null
@@ -1,18 +0,0 @@
-# arg 1: the new package version
-post_install() {
- [ -f var/state/dhcp/dhcpd.leases ] || : >var/state/dhcp/dhcpd.leases
- [ -f var/state/dhcp/dhcpd6.leases ] || : >var/state/dhcp/dhcpd6.leases
- #echo "If dhcpd doesn't start, ensure the ipv6 kernel module is loaded."
-
- echo
- echo "==> The dhcp server has now two rc.d scripts."
- echo "==> Use '/etc/rc.d/dhcp6' to use IPv6 dhcp server or"
- echo "==> '/etc/rc.d/dhcp4' to use IPv4 dhcp server."
- echo "==> Make sure that you change your DAEMONS array in '/etc/rc.conf'!"
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- post_install $1
-}
diff --git a/testing/dhcp/dhcp4 b/testing/dhcp/dhcp4
deleted file mode 100644
index 8e1277a37..000000000
--- a/testing/dhcp/dhcp4
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/dhcp
-
-PIDFILE="/var/run/dhcpd.pid"
-
-if [[ -f $PIDFILE ]]; then
- read -r PID < "$PIDFILE"
-
- # prevent stale pidfiles from hanging around
- if [[ ! -d /proc/$PID ]]; then
- echo 'pid not found. deleteing stale pidfile'
- unset PID
- rm -f "$PIDFILE"
- fi
-fi
-
-case "$1" in
- start)
- stat_busy "Starting DHCPv4 Server"
- if [[ $PID ]]; then
- stat_fail
- exit 1
- fi
- if /usr/sbin/dhcpd -4 -pf "$PIDFILE" $DHCP4_ARGS; then
- add_daemon dhcp4
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- stop)
- stat_busy "Stopping DHCPv4 Server"
- if [[ ! $PID ]]; then
- stat_fail
- exit 1
- fi
- if { kill $PID && rm -f "$PIDFILE"; } &>/dev/null; then
- rm_daemon dhcp4
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-
diff --git a/testing/dhcp/dhcp6 b/testing/dhcp/dhcp6
deleted file mode 100644
index 6b4b4d359..000000000
--- a/testing/dhcp/dhcp6
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/dhcp
-
-PIDFILE="/var/run/dhcp6.pid"
-
-if [[ -f $PIDFILE ]]; then
- read -r PID < "$PIDFILE"
-
- # prevent stale pidfiles from hanging around
- if [[ ! -d /proc/$PID ]]; then
- echo 'pid not found. deleteing stale pidfile'
- unset PID
- rm -f "$PIDFILE"
- fi
-fi
-
-case "$1" in
- start)
- stat_busy "Starting DHCPv6 Server"
- if [[ $PID ]]; then
- stat_fail
- exit 1
- fi
- if /usr/sbin/dhcpd -6 -pf "$PIDFILE" $DHCP6_ARGS; then
- add_daemon dhcp6
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- stop)
- stat_busy "Stopping DHCPv6 Server"
- if [[ ! $PID ]]; then
- stat_fail
- exit 1
- fi
- if { kill $PID && rm -f "$PIDFILE"; } &>/dev/null; then
- rm_daemon dhcp6
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-
diff --git a/testing/dhcp/dhcpd b/testing/dhcp/dhcpd
deleted file mode 100755
index 1fbb31e7c..000000000
--- a/testing/dhcp/dhcpd
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/dhcp
-
-PIDFILE="/var/run/dhcpd.pid"
-PID=`cat $PIDFILE 2>/dev/null`
-case "$1" in
- start)
- stat_busy "Starting DHCP Server"
- if [ "$PID" = "" ]; then
- /usr/sbin/dhcpd $DHCP_ARGS
- fi
- if [ "$PID" != "" -o $? -gt 0 ]; then
- stat_fail
- else
- add_daemon dhcpd
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping DHCP Server"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- rm -f $PIDFILE
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon dhcpd
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
diff --git a/testing/dhcp/dhcpd4.service b/testing/dhcp/dhcpd4.service
deleted file mode 100644
index 2ef4a9f26..000000000
--- a/testing/dhcp/dhcpd4.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=IPv4 DHCP server
-After=network.target
-
-[Service]
-Type=forking
-PIDFile=/run/dhcpd4.pid
-ExecStart=/usr/sbin/dhcpd -4 -q -pf /run/dhcpd4.pid
-ExecReload=/bin/kill -TERM $MAINPID
-KillSignal=SIGINT
-
-[Install]
-WantedBy=multi-user.target
diff --git a/testing/dhcp/dhcpd6.service b/testing/dhcp/dhcpd6.service
deleted file mode 100644
index eb3b337c6..000000000
--- a/testing/dhcp/dhcpd6.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=IPv6 DHCP server
-After=network.target
-
-[Service]
-Type=forking
-PIDFile=/run/dhcpd6.pid
-ExecStart=/usr/sbin/dhcpd -6 -q -pf /run/dhcpd6.pid
-ExecReload=/bin/kill -TERM $MAINPID
-KillSignal=SIGINT
-
-[Install]
-WantedBy=multi-user.target