diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-04-07 22:31:26 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-04-07 22:31:26 +0000 |
commit | 7b0e39410e168b8a65e95e7b8b4703a9a613a999 (patch) | |
tree | 5552ae6b52e9e8ea697310ecc805a2bd48bfee7e /net-misc/udhcp | |
parent | Remove ciaranm from metadata.xml. (diff) | |
download | gentoo-2-7b0e39410e168b8a65e95e7b8b4703a9a613a999.tar.gz gentoo-2-7b0e39410e168b8a65e95e7b8b4703a9a613a999.tar.bz2 gentoo-2-7b0e39410e168b8a65e95e7b8b4703a9a613a999.zip |
udhcpc now has it's own setup script.
(Portage version: 2.1_pre7-r4)
Diffstat (limited to 'net-misc/udhcp')
-rw-r--r-- | net-misc/udhcp/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/udhcp/Manifest | 43 | ||||
-rw-r--r-- | net-misc/udhcp/files/digest-udhcp-0.9.9_pre20041216-r2 | 3 | ||||
-rw-r--r-- | net-misc/udhcp/files/udhcpc.sh | 106 | ||||
-rw-r--r-- | net-misc/udhcp/udhcp-0.9.9_pre20041216-r2.ebuild | 48 |
5 files changed, 194 insertions, 16 deletions
diff --git a/net-misc/udhcp/ChangeLog b/net-misc/udhcp/ChangeLog index b51a68656486..3a4359f9ac65 100644 --- a/net-misc/udhcp/ChangeLog +++ b/net-misc/udhcp/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/udhcp -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/udhcp/ChangeLog,v 1.20 2005/07/05 20:25:07 killerfox Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/udhcp/ChangeLog,v 1.21 2006/04/07 22:31:26 uberlord Exp $ + +*udhcp-0.9.9_pre20041216-r2 (07 Apr 2006) + + 07 Apr 2006; Roy Marples <uberlord@gentoo.org> +files/udhcpc.sh, + +udhcp-0.9.9_pre20041216-r2.ebuild: + udhcpc now has it's own setup script. 05 Jul 2005; Rene Nussbaumer <killerfox@gentoo.org> udhcp-0.9.9_pre20041216-r1.ebuild: diff --git a/net-misc/udhcp/Manifest b/net-misc/udhcp/Manifest index 8a77d7d5fce6..3aefc3156439 100644 --- a/net-misc/udhcp/Manifest +++ b/net-misc/udhcp/Manifest @@ -1,18 +1,33 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 f7cf08042f73406626636505568b4e3c udhcp-0.9.9_pre20041216-r1.ebuild 957 -MD5 868c6076c59683693fcc427bdb75c9f4 udhcp-0.9.8-r3.ebuild 1166 -MD5 8ef75eba39772bdd1a8facc7815dbebb metadata.xml 161 MD5 e81277b937332cee3f6e4f598e010096 ChangeLog 2652 +RMD160 930d042dca513eeaaa973ab653707d9b0516e004 ChangeLog 2652 +SHA256 1c199df42ba8215c6d50cc2300c3a0ffaef8270f12a280cc83ceea21e029fa4b ChangeLog 2652 +MD5 83ca9ef49068eb2140999999f245f486 files/digest-udhcp-0.9.8-r3 62 +RMD160 827b8c585d2fd7484a4f4d6abb10ac740019304b files/digest-udhcp-0.9.8-r3 62 +SHA256 bfd9a942174c54f6ae53734609f4b721c1c4b885851d1b984e371dfc88a2d7ba files/digest-udhcp-0.9.8-r3 62 MD5 64ee022cd292b97023d7abb6b5176905 files/digest-udhcp-0.9.9_pre20041216-r1 75 +RMD160 f64388a31b3649e172682f64ad46e6be4b600139 files/digest-udhcp-0.9.9_pre20041216-r1 75 +SHA256 574364d7da5c57aab18a25fac14ec639c885a7789ce34ce0160ad290c594cd2a files/digest-udhcp-0.9.9_pre20041216-r1 75 +MD5 3abdec37a6b19a6b855f1a7b4f291234 files/digest-udhcp-0.9.9_pre20041216-r2 271 +RMD160 a3cc96f239981b7db322e546083f1a17563e4d51 files/digest-udhcp-0.9.9_pre20041216-r2 271 +SHA256 8e1df539da56f114fe2b51e764815ff78da8a95d378222fce1568467d63f19e0 files/digest-udhcp-0.9.9_pre20041216-r2 271 MD5 841852ac59a61a1940dd9d509821f231 files/udhcp-gcc-3.4.patch 261 +RMD160 d0c31131bc4c14ef20f0a52c46e15a6034bb3fc9 files/udhcp-gcc-3.4.patch 261 +SHA256 f4ffec4f9bf809b82c4f8a48a3a0b098084c50f904d6c8b1513cb32087459802 files/udhcp-gcc-3.4.patch 261 MD5 f74f1f81c1fd4933d63b860dc070eec6 files/udhcp.rc 719 -MD5 83ca9ef49068eb2140999999f245f486 files/digest-udhcp-0.9.8-r3 62 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDC7n1gIKl8Uu19MoRAp/0AKCDuJbbvXSprmtdo8+T2szsKMQKkQCeJG/r -KLFZa1KPHydWtTZvgKstHr0= -=+d2a ------END PGP SIGNATURE----- +RMD160 15d474dd873685bf1c301e772548a27f6fc26d5e files/udhcp.rc 719 +SHA256 ec031a7de6ed600d5172fc6e131dfd16160e471da9aac8558ad88f1b1c5bc6e1 files/udhcp.rc 719 +MD5 9f07cc5fa5c207b1c9a17362f06d19ed files/udhcpc.sh 2574 +RMD160 d5b1af4160f711f4c56fdc68cd5ce269cf5041bc files/udhcpc.sh 2574 +SHA256 dac13ff4adc0a9ce5262d6dad11eddd11fa7db0a391a6132c2610af3923333b9 files/udhcpc.sh 2574 +MD5 8ef75eba39772bdd1a8facc7815dbebb metadata.xml 161 +RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 metadata.xml 161 +SHA256 a11fdd02015a232398fdf22a20d26a95fc34d44c54513e6b26b6128d0b76122e metadata.xml 161 +MD5 868c6076c59683693fcc427bdb75c9f4 udhcp-0.9.8-r3.ebuild 1166 +RMD160 386711e40d25bfae45fd8500a34c167efa0c8495 udhcp-0.9.8-r3.ebuild 1166 +SHA256 86b8bdb9f65695e9cf3fcf850072df2fef5d9044158029b66f8f9de096a40378 udhcp-0.9.8-r3.ebuild 1166 +MD5 f7cf08042f73406626636505568b4e3c udhcp-0.9.9_pre20041216-r1.ebuild 957 +RMD160 a96ba48a633f192c60445b2ca78ffbd1e7245254 udhcp-0.9.9_pre20041216-r1.ebuild 957 +SHA256 0fd541d581cf51d24abdb3aae786349e7fff948c35a91285a20869f23cbee72d udhcp-0.9.9_pre20041216-r1.ebuild 957 +MD5 9006df1e0221875df78c11657822f0e8 udhcp-0.9.9_pre20041216-r2.ebuild 1248 +RMD160 20ba20be262d8e5935c25330c8ed02ec8dcb2234 udhcp-0.9.9_pre20041216-r2.ebuild 1248 +SHA256 d18cf42f27d20e04ea9172249211a89f3fde625bd8edf81ccaf5532abbecfa0c udhcp-0.9.9_pre20041216-r2.ebuild 1248 diff --git a/net-misc/udhcp/files/digest-udhcp-0.9.9_pre20041216-r2 b/net-misc/udhcp/files/digest-udhcp-0.9.9_pre20041216-r2 new file mode 100644 index 000000000000..d5e8d6d049f6 --- /dev/null +++ b/net-misc/udhcp/files/digest-udhcp-0.9.9_pre20041216-r2 @@ -0,0 +1,3 @@ +MD5 759bb5f1f05e4725a48e5019fa5f61f2 udhcp-0.9.9_pre20041216.tar.bz2 42353 +RMD160 ed223b166f9ab9c0e0b210b690319e3ca8417af5 udhcp-0.9.9_pre20041216.tar.bz2 42353 +SHA256 e4bcf9490f5e5c14a97d6ca46f054225e15a765edf9cdb181888032a0082dad6 udhcp-0.9.9_pre20041216.tar.bz2 42353 diff --git a/net-misc/udhcp/files/udhcpc.sh b/net-misc/udhcp/files/udhcpc.sh new file mode 100644 index 000000000000..ab7be9a9d4fa --- /dev/null +++ b/net-misc/udhcp/files/udhcpc.sh @@ -0,0 +1,106 @@ +#!/bin/sh +# udhcp setup script +# Ideally this should be in /etc/udhcp, but Spanky insists it belongs in +# rcscripts as it's only baselayout that forces it. Ce la vie. + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +update_dns() +{ + [[ -n "${PEER_DNS}" ]] && [[ "${PEER_DNS}" != "yes" ]] && return + [[ -z "${domain}" ]] && [[ -z "${dns}" ]] && return + + conf="# Generated by udhcpc for ${interface}\n" + [[ -n "${domain}" ]] && conf="${conf}search ${domain}\n" + for i in ${dns} ; do + conf="${conf}nameserver ${i}\n" + done + if [[ -x /sbin/resolvconf ]] ; then + echo -e "${conf}" | resolvconf -a ${interface} + else + echo -e "${conf}" > /etc/resolv.conf + chmod 644 /etc/resolv.conf + fi +} + +update_ntp() { + [[ -n "${PEER_NTP}" ]] && [[ "${PEER_NTP}" != "yes" ]] && return + [[ -z "${ntpsrv}" ]] && return + + conf="# Generated by udhcpc for interface ${interface}\n" + conf="${conf}restrict default noquery notrust nomodify\n" + conf="${conf}restrict 127.0.0.1\n" + for i in ${ntpsrv} ; do + conf="${conf}restrict ${i} nomodify notrap noquery\n" + conf="${conf}server ${i}\n" + done + conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" + conf="${conf}logfile /var/log/ntp.log\n" + echo -e "${conf}" > /etc/ntp.conf + chmod 644 /etc/ntp.conf +} + +update_hostname() { + [[ -n "${PEER_HOSTNAME}" ]] && [[ "${PEER_HOSTNAME}" != "yes" ]] && return + [[ -z "${hostname}" ]] && return + + myhost="$(hostname)" + [[ -z ${myhost} ]] || [[ ${myhost} == "(none)" ]] && hostname "${hostname}" +} + +update_interface() +{ + [[ -n "${broadcast}" ]] && broadcast="broadcast ${broadcast}" + [[ -n "${subnet}" ]] && netmask="netmask ${subnet}" + [[ -n "${mtu}" ]] && mtu="mtu ${mtu}" + ifconfig "${interface}" ${ip} ${broadcast} ${netmask} ${mtu} +} + +update_routes() +{ + while route del default dev "${interface}" 2>/dev/null ; do + : + done + if [[ -n "${router}" ]] ; then + metric= + [[ -n "${IF_METRIC}" ]] && metric="metric ${IF_METRIC}" + for i in ${router} ; do + route add default gw "${i}" ${metric} dev "${interface}" + done + fi +} + +deconfig() +{ + ifconfig "${interface}" 0.0.0.0 + [[ -x /sbin/resolvconf ]] && resolvconf -d "${interface}" +} + +# As udhcp will not pass as any custom env vars, we load this file instead. +[[ -e /var/run/udhcpc-"${interface}".conf ]] \ + && . /var/run/udhcpc-"${interface}".conf + +case "$1" in + bound|renew) + update_hostname + update_interface + update_routes + update_dns + update_ntp + ;; + deconfig|leasefail) + deconfig + ;; + nak) + echo "nak: ${message}" + ;; + *) + echo "unknown option $1" >&2 + echo "Usage: $0 {bound|deconfig|leasefail|nak|renew}" >&2 + exit 1 + ;; +esac + +exit 0 + +# vim: ts=4 : diff --git a/net-misc/udhcp/udhcp-0.9.9_pre20041216-r2.ebuild b/net-misc/udhcp/udhcp-0.9.9_pre20041216-r2.ebuild new file mode 100644 index 000000000000..0236e87017aa --- /dev/null +++ b/net-misc/udhcp/udhcp-0.9.9_pre20041216-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/udhcp/udhcp-0.9.9_pre20041216-r2.ebuild,v 1.1 2006/04/07 22:31:26 uberlord Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="udhcp Server/Client Package" +HOMEPAGE="http://udhcp.busybox.net/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="virtual/libc" +PROVIDE="virtual/dhcpc" + +S="${WORKDIR}/${PN}" + +pkg_setup() { + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp +} + +src_compile() { + emake \ + CROSS_COMPILE=${CHOST}- \ + STRIP=true \ + UDHCP_SYSLOG=1 \ + || die +} + +src_install() { + make STRIP=true install DESTDIR="${D}" USRSBINDIR="${D}/sbin" || die + newinitd "${FILESDIR}"/udhcp.rc udhcp + insinto /etc + doins samples/udhcpd.conf + dodoc AUTHORS ChangeLog README* TODO + newdoc samples/README README.scripts + + # udhcpc setup script - the supplied ones don't work + # These do and they support resolvconf and the loading of an extra + # config file which can affect the create of resolv.conf, ntp.conf + # and route metrics. + exeinto /lib/rcscripts/sh + newexe "${FILESDIR}"/udhcpc.sh udhcpc.sh +} |