diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-16 17:33:21 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-16 18:20:47 +0000 |
commit | f10bb5847f65f3222c5d9a3ac6ed30f37c0ccca0 (patch) | |
tree | 232e109e6f565935f5cca37fbe32f11d617bd45a | |
parent | 7a488bed5282efb0104d9ccecf7bd14a2686ba83 (diff) | |
download | alpine_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/APKBUILD | 17 | ||||
-rw-r--r-- | main/dhcp/dhcrelay.confd | 13 | ||||
-rw-r--r-- | main/dhcp/dhcrelay.initd | 33 |
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 @@ | |||
2 | pkgname=dhcp | 2 | pkgname=dhcp |
3 | pkgver=4.1.0_p1 | 3 | pkgver=4.1.0_p1 |
4 | _realver=4.1.0p1 | 4 | _realver=4.1.0p1 |
5 | pkgrel=5 | 5 | pkgrel=6 |
6 | pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)" | 6 | pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)" |
7 | url="https://www.isc.org/" | 7 | url="https://www.isc.org/" |
8 | license="GPL" | 8 | license="GPL" |
9 | depends= | 9 | depends= |
10 | makedepends= | 10 | makedepends= |
11 | install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade" | 11 | install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade" |
12 | subpackages="$pkgname-doc $pkgname-dev dhclient" | 12 | subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay" |
13 | source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz | 13 | source="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 | ||
63 | dhcrelay() { | ||
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 | |||
61 | md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz | 72 | md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz |
62 | 37abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch | 73 | 37abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch |
63 | a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch | 74 | a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch |
75 | ce18f48dff6ef20c6efa2a052584b536 dhcrelay.initd | ||
76 | db84514fe15fd7d81136afbaae738f55 dhcrelay.confd | ||
64 | df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd | 77 | df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd |
65 | be2259371681bd4ab8a577b1b1a989ae dhcpd.initd" | 78 | be2259371681bd4ab8a577b1b1a989ae 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. | ||
13 | DHCRELAY_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 | |||
6 | depend() { | ||
7 | need net | ||
8 | use logger | ||
9 | after firewall | ||
10 | } | ||
11 | |||
12 | start() { | ||
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 | |||
29 | stop() { | ||
30 | ebegin "Stopping dhcrelay" | ||
31 | start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid | ||
32 | eend $? | ||
33 | } | ||