aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-16 17:33:21 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-16 18:20:47 +0000
commitf10bb5847f65f3222c5d9a3ac6ed30f37c0ccca0 (patch)
tree232e109e6f565935f5cca37fbe32f11d617bd45a
parent7a488bed5282efb0104d9ccecf7bd14a2686ba83 (diff)
downloadalpine_aports-f10bb5847f65f3222c5d9a3ac6ed30f37c0ccca0.tar.bz2
alpine_aports-f10bb5847f65f3222c5d9a3ac6ed30f37c0ccca0.tar.xz
alpine_aports-f10bb5847f65f3222c5d9a3ac6ed30f37c0ccca0.zip
main/dhcp: create dhcrelay subpackage with init.d script
fixes #281 (cherry picked from commit 669e19155dc8d1649d48fa4a2ee8c972f2ff453d)
-rw-r--r--main/dhcp/APKBUILD17
-rw-r--r--main/dhcp/dhcrelay.confd13
-rw-r--r--main/dhcp/dhcrelay.initd33
3 files changed, 61 insertions, 2 deletions
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD
index c2177e5a8c..e78065233e 100644
--- a/main/dhcp/APKBUILD
+++ b/main/dhcp/APKBUILD
@@ -2,17 +2,19 @@
2pkgname=dhcp 2pkgname=dhcp
3pkgver=4.1.0_p1 3pkgver=4.1.0_p1
4_realver=4.1.0p1 4_realver=4.1.0p1
5pkgrel=5 5pkgrel=6
6pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)" 6pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)"
7url="https://www.isc.org/" 7url="https://www.isc.org/"
8license="GPL" 8license="GPL"
9depends= 9depends=
10makedepends= 10makedepends=
11install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade" 11install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade"
12subpackages="$pkgname-doc $pkgname-dev dhclient" 12subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay"
13source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz 13source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz
14 linux_ipv6_discover.patch 14 linux_ipv6_discover.patch
15 dhcp-3.0-fix-perms.patch 15 dhcp-3.0-fix-perms.patch
16 dhcrelay.initd
17 dhcrelay.confd
16 dhcpd.confd 18 dhcpd.confd
17 dhcpd.initd" 19 dhcpd.initd"
18 20
@@ -58,8 +60,19 @@ dhclient() {
58 mv "$pkgdir"/etc/dhcp/dhclient.conf "$subpkgdir"/etc/dhcp/ 60 mv "$pkgdir"/etc/dhcp/dhclient.conf "$subpkgdir"/etc/dhcp/
59} 61}
60 62
63dhcrelay() {
64 pkgdesc="ISC dhcp relay server"
65 install -d "$pkgdir"/var/run/dhcp
66 install -d "$subpkgdir"/usr/sbin
67 mv "$pkgdir"/usr/sbin/dhcrelay "$subpkgdir"/usr/sbin/
68 install -m755 -D "$srcdir"/dhcrelay.initd "$pkgdir"/etc/init.d/dhcrelay
69 install -m644 -D "$srcdir"/dhcrelay.confd "$pkgdir"/etc/conf.d/dhcrelay
70}
71
61md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz 72md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz
6237abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch 7337abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch
63a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch 74a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch
75ce18f48dff6ef20c6efa2a052584b536 dhcrelay.initd
76db84514fe15fd7d81136afbaae738f55 dhcrelay.confd
64df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd 77df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd
65be2259371681bd4ab8a577b1b1a989ae dhcpd.initd" 78be2259371681bd4ab8a577b1b1a989ae dhcpd.initd"
diff --git a/main/dhcp/dhcrelay.confd b/main/dhcp/dhcrelay.confd
new file mode 100644
index 0000000000..1102d3a41b
--- /dev/null
+++ b/main/dhcp/dhcrelay.confd
@@ -0,0 +1,13 @@
1# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay
2
3# Configure which interface or interfaces to for dhcrelay to listen on
4# and send to.
5# List all interfaces space separated. If this is not specified then
6# we use all interfaces.
7#IFACE=""
8
9# Insert any other options needed. See dhcrelay(8) for details.
10#DHCRELAY_OPTS=""
11
12# Space separated list of IPs to forward BOOTP/DHCP packets to.
13DHCRELAY_SERVERS=""
diff --git a/main/dhcp/dhcrelay.initd b/main/dhcp/dhcrelay.initd
new file mode 100644
index 0000000000..dc55bf0f2e
--- /dev/null
+++ b/main/dhcp/dhcrelay.initd
@@ -0,0 +1,33 @@
1#!/sbin/runscript
2# Copyright 1999-2004 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License v2
4# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init,v 1.2 2007/03/22 15:36:59 uberlord Exp $
5
6depend() {
7 need net
8 use logger
9 after firewall
10}
11
12start() {
13 if [ -z "${DHCRELAY_SERVERS}" ]; then
14 eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay"
15 return 1
16 fi
17
18 local IFACES= i=
19 for i in ${IFACE} ; do
20 IFACES="${IFACES} -i ${i}"
21 done
22
23 ebegin "Starting dhcrelay"
24 start-stop-daemon --start --exec /usr/sbin/dhcrelay \
25 -- -q ${IFACES} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
26 eend $?
27}
28
29stop() {
30 ebegin "Stopping dhcrelay"
31 start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid
32 eend $?
33}