diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2003-10-30 07:53:00 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2003-10-30 07:53:00 +0000 |
commit | 6df49274d17b4011332e3465ce455f7918d16024 (patch) | |
tree | 5257dbf9f55daba9fd39fb4554521615270c92c5 /net-misc/udhcp | |
parent | added initscript (diff) | |
download | historical-6df49274d17b4011332e3465ce455f7918d16024.tar.gz historical-6df49274d17b4011332e3465ce455f7918d16024.tar.bz2 historical-6df49274d17b4011332e3465ce455f7918d16024.zip |
added initscript
Diffstat (limited to 'net-misc/udhcp')
-rw-r--r-- | net-misc/udhcp/Manifest | 6 | ||||
-rw-r--r-- | net-misc/udhcp/files/digest-udhcp-0.9.8-r1 | 1 | ||||
-rw-r--r-- | net-misc/udhcp/files/udhcp.init | 41 | ||||
-rw-r--r-- | net-misc/udhcp/udhcp-0.9.8-r1.ebuild | 36 |
4 files changed, 81 insertions, 3 deletions
diff --git a/net-misc/udhcp/Manifest b/net-misc/udhcp/Manifest index db0c4775c78f..d7fdb63db3da 100644 --- a/net-misc/udhcp/Manifest +++ b/net-misc/udhcp/Manifest @@ -1,6 +1,6 @@ MD5 f34de81f0c04f0c4ba2a5288ef5a979b udhcp-0.9.8.ebuild 721 -MD5 a08d74fcb332a5fc965e94ecb51bcc4f udhcp-0.9.8-r1.ebuild 779 -MD5 a56b24f41aef5572ff8582f904b9b861 ChangeLog 535 +MD5 58bb7d676d5b6f660266d256e56256c4 udhcp-0.9.8-r1.ebuild 819 +MD5 35ea2e4f4004506091942f9273e4b46f ChangeLog 718 MD5 83ca9ef49068eb2140999999f245f486 files/digest-udhcp-0.9.8-r1 62 MD5 83ca9ef49068eb2140999999f245f486 files/digest-udhcp-0.9.8 62 -MD5 e4f37bd21182d45854f195abbc529306 files/udhcp.init 1005 +MD5 90de5a6f8bea03337ada4f6e27c01273 files/udhcp.init 1012 diff --git a/net-misc/udhcp/files/digest-udhcp-0.9.8-r1 b/net-misc/udhcp/files/digest-udhcp-0.9.8-r1 new file mode 100644 index 000000000000..0407c3fff96e --- /dev/null +++ b/net-misc/udhcp/files/digest-udhcp-0.9.8-r1 @@ -0,0 +1 @@ +MD5 2d7e548820d2ded5e183933cb701defb udhcp-0.9.8.tar.gz 43889 diff --git a/net-misc/udhcp/files/udhcp.init b/net-misc/udhcp/files/udhcp.init new file mode 100644 index 000000000000..184fda541881 --- /dev/null +++ b/net-misc/udhcp/files/udhcp.init @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/udhcp/files/udhcp.init,v 1.1 2003/10/30 07:52:59 seemant Exp $ + +depend() { + need net + use logger dns +} + +checkconfig() { + if [ ! -f "${CHROOT}/etc/udhcpd.conf" ] ; then + eerror "No ${CHROOT}/etc/udhcpd.conf file exists!" + return 1 + fi + + if [ ! -f "${CHROOT}/var/lib/misc/udhcpd.leases" ] ; then + ebegin "Creating dhcpd.leases" + touch "${CHROOT}/var/lib/misc/udhcpd.leases" || return 1 + eend $? + fi + + ebegin "Setting ownership on dhcpd.leases" + chown dhcp:dhcp "${CHROOT}/var/lib/misc/udhcpd.leases" || return 1 + eend $? +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${CHROOT:+chrooted }dhcpd" + start-stop-daemon --start --quiet --exec /usr/sbin/udhcpd \ + ${CHROOT:+-chroot ${CHROOT}} ${IFACE} + eend $? +} + +stop() { + ebegin "Stopping dhcpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/udhcpd + eend $? +} diff --git a/net-misc/udhcp/udhcp-0.9.8-r1.ebuild b/net-misc/udhcp/udhcp-0.9.8-r1.ebuild new file mode 100644 index 000000000000..658c12146b92 --- /dev/null +++ b/net-misc/udhcp/udhcp-0.9.8-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/udhcp/udhcp-0.9.8-r1.ebuild,v 1.1 2003/10/30 07:52:59 seemant Exp $ + +DESCRIPTION="udhcp Server/Client Package" +HOMEPAGE="http://udhcp.busybox.net/" +SRC_URI="http://udhcp.busybox.net/source/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~arm ~ia64 amd64" + +DEPEND="" + +src_compile() { + emake SYSLOG=1 || die +} + +src_install() { + dodir /usr/sbin + dodir /usr/bin + dodir /sbin + + insinto /etc + doins samples/udhcpd.conf + + make prefix=${D}/usr SBINDIR=${D}/sbin install || die + + dodoc AUTHORS COPYING ChangeLog README* TODO + + insinto /usr/share/udhcpc + doins samples/* + + exeinto /etc/init.d + newexe ${FILESDIR}/udhcp.init udhcp +} |