summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Martin <gmsoft@gentoo.org>2003-11-18 16:18:45 +0000
committerGuy Martin <gmsoft@gentoo.org>2003-11-18 16:18:45 +0000
commitc281b3931a0c176cffc02bf767a5bafe7ba5b9af (patch)
treee42c1b07478ca1687780950efc577154395be153 /net-misc
parentAdded the -o options which prevents dhcpcd to bring the interface down on exit. (diff)
downloadgentoo-2-c281b3931a0c176cffc02bf767a5bafe7ba5b9af.tar.gz
gentoo-2-c281b3931a0c176cffc02bf767a5bafe7ba5b9af.tar.bz2
gentoo-2-c281b3931a0c176cffc02bf767a5bafe7ba5b9af.zip
Added the -o options which prevents dhcpcd to bring the interface down on exit.
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcpcd/ChangeLog8
-rw-r--r--net-misc/dhcpcd/Manifest4
-rw-r--r--net-misc/dhcpcd/dhcpcd-1.3.22_p4-r3.ebuild62
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff80
-rw-r--r--net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r33
5 files changed, 154 insertions, 3 deletions
diff --git a/net-misc/dhcpcd/ChangeLog b/net-misc/dhcpcd/ChangeLog
index 931bd65aec93..2873fe89ec64 100644
--- a/net-misc/dhcpcd/ChangeLog
+++ b/net-misc/dhcpcd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/dhcpcd
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.26 2003/11/04 01:02:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.27 2003/11/18 16:18:17 gmsoft Exp $
+
+*dhcpcd-1.3.22_p4-r3 (18 Nov 2003)
+
+ 18 Nov 2003; Guy Martin <gmsoft@gentoo.org> dhcpcd-1.3.22_p4-r3.ebuild:
+ Added the -o options which prevents dhcpcd to bring the interface down
+ on exit.
*dhcpcd-1.3.22_p4-r2 (03 Nov 2003)
diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 2b45da7535d2..5711f8d2eec4 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,6 +1,6 @@
-MD5 1b3ec371133112e35b2f04526f53599f ChangeLog 4379
+MD5 ce6fae386d14a5571fe6265032ae999c ChangeLog 4574
MD5 55ed9fc47c4172c2b16baa390d2b2a26 dhcpcd-1.3.22_p4-r2.ebuild 1855
-MD5 8f18504ff56c552bd324508a4bc1264b dhcpcd-1.3.22_p4-r3.ebuild 2034
+MD5 1f4e44ca844404d1befd914f6ac3e37a dhcpcd-1.3.22_p4-r3.ebuild 2034
MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r2 224
MD5 e5580d4472c718a772f6e1c700757968 files/dhcpcd-1.3.22_p4-no-iface-down.diff 2606
MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r3 224
diff --git a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r3.ebuild b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r3.ebuild
new file mode 100644
index 000000000000..fd15d8932a34
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r3.ebuild,v 1.1 2003/11/18 16:18:17 gmsoft Exp $
+
+inherit gnuconfig flag-o-matic eutils
+
+DESCRIPTION="A dhcp client only"
+HOMEPAGE="http://www.phystech.com/download/"
+SRC_URI="ftp://ftp.phystech.com/pub/${P/_p/-pl}.tar.gz
+ http://dev.gentoo.org/~drobbins/${P}.diff.bz2
+ http://dev.gentoo.org/~drobbins/${P}-keepCacheAndResolv.diff.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~arm ~mips ~amd64 ~ia64"
+IUSE="build static"
+
+DEPEND="virtual/glibc"
+
+S=${WORKDIR}/${P/_p/-pl}
+
+src_unpack() {
+ unpack ${A} || die "unpack failed"
+ use alpha && gnuconfig_update
+ use amd64 && gnuconfig_update
+ use hppa && gnuconfig_update
+ use ia64 && gnuconfig_update
+
+ cd ${S}
+ #Started working on this patch from an older version I found; then
+ #discovered that LFS had an updated one. We're using a patch that is
+ #identical to theirs. It makes dhcpcd FHS-compliant. (drobbins, 06
+ #Sep 2003)
+ epatch ${DISTDIR}/${P}.diff.bz2
+ #This next patch from Alwyn Schoeman <alwyn@smart.com.ph> is great;
+ #it adds a -z (shutdown, keep cache) and various other little tweaks.
+ #See http://bugs.gentoo.org/show_bug.cgi?id=23428 for more info.
+ epatch ${DISTDIR}/${P}-keepCacheAndResolv.diff.bz2
+ #This patch remove the iface down instruction from dhcpcd allowing us
+ #to have physical iface scripts (gmsoft, 11 Nov 2003)
+ epatch ${FILESDIR}/${P}-no-iface-down.diff
+ #remove hard-coded arch stuff (drobbins, 06 Sep 2003)
+ sed -i "s/ -march=i.86//g" configure
+ sed -i 's:/etc/ntp\.drift:/var/lib/ntp/ntp.drift:' dhcpconfig.c
+}
+
+src_compile() {
+ use static && append-flags -static
+
+ ./configure --prefix="" --sysconfdir=/var/lib --mandir=/usr/share/man || die
+ emake || die
+}
+
+src_install() {
+ einstall sbindir=${D}/sbin || die "Install failed"
+ if [ -z "`use build`" ]
+ then
+ dodoc AUTHORS COPYING ChangeLog NEWS README
+ else
+ rm -rf ${D}/usr/share
+ fi
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff
new file mode 100644
index 000000000000..5736a5e6f1dd
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff
@@ -0,0 +1,80 @@
+diff -uNr dhcpcd-1.3.22-pl4.orig/client.c dhcpcd-1.3.22-pl4/client.c
+--- dhcpcd-1.3.22-pl4.orig/client.c 2003-11-12 13:19:38.000000000 +0100
++++ dhcpcd-1.3.22-pl4/client.c 2003-11-12 14:39:45.000000000 +0100
+@@ -73,6 +73,7 @@
+ extern int resolv_renamed,yp_renamed,ntp_renamed;
+ extern int InitialHostName_len,InitialDomainName_len;
+ extern char *InitialHostName,*InitialDomainName;
++extern int DownIfaceOnStop;
+
+ #if 0
+ extern unsigned char ClientMACaddr[ETH_ALEN];
+@@ -1142,9 +1143,12 @@
+ if ( ioctl(dhcpSocket,SIOCSIFADDR,&ifr) == -1 )
+ syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFADDR: %m\n");
+ #endif
+- ifr.ifr_flags = saved_if_flags & ~IFF_UP;
+- if ( (IfName_len==IfNameExt_len) && ioctl(dhcpSocket,SIOCSIFFLAGS,&ifr) )
+- syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFFLAGS: %m\n");
++ if (DownIfaceOnStop)
++ {
++ ifr.ifr_flags = saved_if_flags & ~IFF_UP;
++ if ( (IfName_len==IfNameExt_len) && ioctl(dhcpSocket,SIOCSIFFLAGS,&ifr) )
++ syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFFLAGS: %m\n");
++ }
+ tsc:
+ close(dhcpSocket);
+ if ( resolv_renamed )
+diff -uNr dhcpcd-1.3.22-pl4.orig/dhcpcd.8 dhcpcd-1.3.22-pl4/dhcpcd.8
+--- dhcpcd-1.3.22-pl4.orig/dhcpcd.8 2003-11-12 13:19:38.000000000 +0100
++++ dhcpcd-1.3.22-pl4/dhcpcd.8 2003-11-12 14:39:45.000000000 +0100
+@@ -9,7 +9,7 @@
+ .in +.5i
+ .ti -.5i
+ dhcpcd
+-\%[\-dknrzBCDHNRSTY]
++\%[\-dknorzBCDHNRSTY]
+ \%[\-t\ <timeout>]
+ \%[\-c\ <ExecFilePath>]
+ \%[-h\ <hostname>]
+@@ -121,6 +121,13 @@
+ .B dhcpcd
+ follows the normal startup procedure.
+ .TP
++.BI \-o
++Prevents
++.B dhcpcd
++from bringing
++.B interface
++down on exit.
++.TP
+ .BI \-r
+ Makes dhcpcd RFC1541 (obsolete) compliant.
+ .B dhcpcd
+diff -uNr dhcpcd-1.3.22-pl4.orig/dhcpcd.c dhcpcd-1.3.22-pl4/dhcpcd.c
+--- dhcpcd-1.3.22-pl4.orig/dhcpcd.c 2003-11-12 13:19:38.000000000 +0100
++++ dhcpcd-1.3.22-pl4/dhcpcd.c 2003-11-12 15:20:11.000000000 +0100
+@@ -70,6 +70,7 @@
+ int Window = 0;
+ char *ConfigDir = CONFIG_DIR;
+ int SetDHCPDefaultRoutes= 1;
++int DownIfaceOnStop = 1;
+ #if 0
+ unsigned char ClientMACaddr[ETH_ALEN];
+ int ClientMACaddr_ind = 0;
+@@ -326,10 +327,14 @@
+ goto usage;
+ s=1;
+ if ( LeaseTime > 0 ) break;
++ case 'o':
++ s++;
++ DownIfaceOnStop=0;
++ break;
+ default:
+ usage: print_version();
+ fprintf(stderr,
+-"Usage: dhcpcd [-dknrzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
++"Usage: dhcpcd [-dknorzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
+ [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\
+ [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]\n");
+ exit(1);
diff --git a/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r3 b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r3
new file mode 100644
index 000000000000..80b4247cc65e
--- /dev/null
+++ b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r3
@@ -0,0 +1,3 @@
+MD5 dd627a121e43835bead3ffef5b1a72fd dhcpcd-1.3.22-pl4.tar.gz 148455
+MD5 0960ef5d5070da205ffacd5107492e36 dhcpcd-1.3.22_p4.diff.bz2 1646
+MD5 6a502cc0c572f898f8ba5daa34c37901 dhcpcd-1.3.22_p4-keepCacheAndResolv.diff.bz2 1800