summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-04-07 23:59:37 +0000
committerRoy Marples <uberlord@gentoo.org>2006-04-07 23:59:37 +0000
commit90feecdbffcedc150c6349a33c45d33fdbdaafd4 (patch)
tree3ef03164bbdf104837c45d16ca6b918537c8c6fb /net-misc/pump
parentAdd imlib useflag, somebody might not like having gtk1.2 forced in (as it doe... (diff)
downloadhistorical-90feecdbffcedc150c6349a33c45d33fdbdaafd4.tar.gz
historical-90feecdbffcedc150c6349a33c45d33fdbdaafd4.tar.bz2
historical-90feecdbffcedc150c6349a33c45d33fdbdaafd4.zip
New patch, now with resolvconf support.
Actually we don't unpatch it from Debians patch, but whatever ;) Package-Manager: portage-2.1_pre7-r4
Diffstat (limited to 'net-misc/pump')
-rw-r--r--net-misc/pump/ChangeLog11
-rw-r--r--net-misc/pump/Manifest45
-rw-r--r--net-misc/pump/files/digest-pump-0.8.21-r96
-rw-r--r--net-misc/pump/files/pump-0.8.21-gentoo-2.patch611
-rw-r--r--net-misc/pump/pump-0.8.21-r9.ebuild65
5 files changed, 731 insertions, 7 deletions
diff --git a/net-misc/pump/ChangeLog b/net-misc/pump/ChangeLog
index 4234111f3efc..7d35c3b67dc9 100644
--- a/net-misc/pump/ChangeLog
+++ b/net-misc/pump/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/pump
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/ChangeLog,v 1.28 2005/11/18 13:05:48 uberlord Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/ChangeLog,v 1.29 2006/04/07 23:59:37 uberlord Exp $
+
+*pump-0.8.21-r9 (07 Apr 2006)
+
+ 07 Apr 2006; Roy Marples <uberlord@gentoo.org>
+ +files/pump-0.8.21-gentoo-2.patch, +pump-0.8.21-r9.ebuild:
+ New patch, now with resolvconf support.
+ Actually we don't unpatch it from Debians patch, but whatever ;)
*pump-0.8.21-r8 (18 Nov 2005)
diff --git a/net-misc/pump/Manifest b/net-misc/pump/Manifest
index bec609ed3c9a..7f1386e6184d 100644
--- a/net-misc/pump/Manifest
+++ b/net-misc/pump/Manifest
@@ -1,8 +1,43 @@
-MD5 8bed0fca68498dde28cc7ac7500322da pump-0.8.21-r8.ebuild 1732
-MD5 94fe4b6cace933a6aaedd7fb52194eca metadata.xml 288
-MD5 d057200fd35820b24f71841abe4fb946 pump-0.8.21-r7.ebuild 1444
-MD5 6ae261b828b5e63c4e2a763c4f8c1723 ChangeLog 4777
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 9901786f7f6fa2d3ef8d554c0f7a134a ChangeLog 5028
+RMD160 f6c8fe13e58d52872bd7f7202f62fcc2a00e4403 ChangeLog 5028
+SHA256 c7583323a393d8bb0a729e9762b705d0e2f0e6f0f0573476710821712514ddd0 ChangeLog 5028
MD5 f3e80515c4994d15e18d1c17c0740970 files/digest-pump-0.8.21-r7 132
-MD5 61f260b871807d65909b25eac4a60853 files/pump-0.8.21-gcc4.patch 3244
+RMD160 f2dd606c17044156e55834436724259ea31773fd files/digest-pump-0.8.21-r7 132
+SHA256 6ba3ed169ce426a2a9173a487422e93328b794635a5c33889cf82eb8b7a114a4 files/digest-pump-0.8.21-r7 132
MD5 f3e80515c4994d15e18d1c17c0740970 files/digest-pump-0.8.21-r8 132
+RMD160 f2dd606c17044156e55834436724259ea31773fd files/digest-pump-0.8.21-r8 132
+SHA256 6ba3ed169ce426a2a9173a487422e93328b794635a5c33889cf82eb8b7a114a4 files/digest-pump-0.8.21-r8 132
+MD5 a2c15f5738bc332e75ab261b6ae707e2 files/digest-pump-0.8.21-r9 488
+RMD160 53495658ffe3748a20f85f4cef53d6737077900d files/digest-pump-0.8.21-r9 488
+SHA256 e2777a640b14733389f47fc4d44dfbb828aa1793d207e38bd8c5c26ad9b7def5 files/digest-pump-0.8.21-r9 488
+MD5 61f260b871807d65909b25eac4a60853 files/pump-0.8.21-gcc4.patch 3244
+RMD160 c43a48a7eea8574756016d2868cb6cf96d75839c files/pump-0.8.21-gcc4.patch 3244
+SHA256 a87f960e240bdb051a13c7e410efea16d45856e7261554a0ce412985a629e89b files/pump-0.8.21-gcc4.patch 3244
+MD5 b18016bf2103d9b6041d1509499d6c50 files/pump-0.8.21-gentoo-2.patch 19762
+RMD160 1f4675fbe67a391b056f1e0de7bdbe666f9b5f28 files/pump-0.8.21-gentoo-2.patch 19762
+SHA256 2c8851718c8a7b6db975f13690ff5e115ef70b0076197cf3152778ab575af1fc files/pump-0.8.21-gentoo-2.patch 19762
MD5 d392ca15c9b4bd656b2bfdc185ba654d files/pump-0.8.21-gentoo.diff 20131
+RMD160 7d5c6200395bb574577d018e5c4f4ada8377cae6 files/pump-0.8.21-gentoo.diff 20131
+SHA256 5f3f61f4a7672175e792fb48c38b2c8afb7afaf1ce353f5a645f09cc554abe98 files/pump-0.8.21-gentoo.diff 20131
+MD5 94fe4b6cace933a6aaedd7fb52194eca metadata.xml 288
+RMD160 906b4569fd44db0aff588a04ac9d895dd5ef7750 metadata.xml 288
+SHA256 175c6563e7dd812572c496f8e8c03471b18f00b04a5c62e6c59222ad304c1c08 metadata.xml 288
+MD5 d057200fd35820b24f71841abe4fb946 pump-0.8.21-r7.ebuild 1444
+RMD160 9c03696fb8deda2a8747dc5003bdf788ce84ae17 pump-0.8.21-r7.ebuild 1444
+SHA256 f5416c3c9a14c5c836d5b15476d8d2bb6122970a7d0c9ec1d43a9843a4bab66b pump-0.8.21-r7.ebuild 1444
+MD5 8bed0fca68498dde28cc7ac7500322da pump-0.8.21-r8.ebuild 1732
+RMD160 e873adbab4da7635b3fa8db619c1735da827ccf7 pump-0.8.21-r8.ebuild 1732
+SHA256 8cea1c70890366fb85ff784295f7c2ad85a1d7210a29b83a78a82a4679d37495 pump-0.8.21-r8.ebuild 1732
+MD5 4440761056569f57c439a38c77c0b4fb pump-0.8.21-r9.ebuild 1594
+RMD160 26b46efe1a298732ed7bb1da497662dab7f1ad6d pump-0.8.21-r9.ebuild 1594
+SHA256 050d6a360ecde0fe401e4c8eeef6fee79ba1452087f2168517134019b4e662e5 pump-0.8.21-r9.ebuild 1594
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+iD8DBQFENvz3EbVyYKaZ/NERAjaXAKCUZ6dS93ufOS9jAMvyAtgmWshm7QCdEl+4
+GdKcn4KiIPZ1w+usfz70bCo=
+=64G8
+-----END PGP SIGNATURE-----
diff --git a/net-misc/pump/files/digest-pump-0.8.21-r9 b/net-misc/pump/files/digest-pump-0.8.21-r9
new file mode 100644
index 000000000000..fb2170369e99
--- /dev/null
+++ b/net-misc/pump/files/digest-pump-0.8.21-r9
@@ -0,0 +1,6 @@
+MD5 22e1a2a142117fe41781e5437a03fcdb pump_0.8.21-2.diff.gz 22259
+RMD160 72438041c50f75e49f07d3361652683ae72032e3 pump_0.8.21-2.diff.gz 22259
+SHA256 4f1cd3c8722a5b05a8a3ece404ec9a4cb0bd0e2a42130489f12ee4a27a51241c pump_0.8.21-2.diff.gz 22259
+MD5 a6925de6cd011605237934a907f8a9c4 pump_0.8.21.orig.tar.gz 79289
+RMD160 0e911d101aba6757f680dddaecbac479df61fdb1 pump_0.8.21.orig.tar.gz 79289
+SHA256 3534015b2e045f7422a6487ad31d6f47f6369029daad92cea8f218e749d84109 pump_0.8.21.orig.tar.gz 79289
diff --git a/net-misc/pump/files/pump-0.8.21-gentoo-2.patch b/net-misc/pump/files/pump-0.8.21-gentoo-2.patch
new file mode 100644
index 000000000000..85e847a24101
--- /dev/null
+++ b/net-misc/pump/files/pump-0.8.21-gentoo-2.patch
@@ -0,0 +1,611 @@
+diff -u pump-0.8.21/config.c /local/pump/pump-0.8.21-r9/config.c
+--- pump-0.8.21/config.c 2006-03-18 09:31:33.000000000 +0000
++++ /local/pump/pump-0.8.21-r9/config.c 2006-03-18 09:14:57.000000000 +0000
+@@ -155,15 +155,26 @@
+ }
+
+ override->numRetries = num;
+- } else if (!strcmp(start, "domainsearch")) {
+- size_t len;
++ } else if (!strcmp(start, "routemetric")) {
++ poptParseArgvString(rest, &argc, &argv);
++
++ if (argc != 1) {
++ parseError(*lineNum, "routemetric directive expects a "
++ "single argument");
++ return 1;
++ }
+
+- if (overrideList != override) {
+- parseError(*lineNum, "domainsearch directive may not occur "
+- "inside of device specification");
++ num = strtol(argv[0], &chptr, 0);
++ if (*chptr) {
++ parseError(*lineNum, "routemetric requires a numeric "
++ "argument");
+ return 1;
+ }
+
++ override->routeMetric = num;
++ } else if (!strcmp(start, "domainsearch")) {
++ size_t len;
++
+ poptParseArgvString(rest, &argc, &argv);
+
+ if (argc != 1) {
+@@ -209,6 +220,12 @@
+ return 1;
+ }
+ override->flags |= OVERRIDE_FLAG_NONISDOMAIN;
++ } else if (!strcmp(start, "nontp")) {
++ if (*rest) {
++ parseError(*lineNum, "unexpected argument to nontp directive");
++ return 1;
++ }
++ override->flags |= OVERRIDE_FLAG_NONTP;
+ } else if (!strcmp(start, "nosetup")) {
+ if (*rest) {
+ parseError(*lineNum, "unexpected argument to nosetup directive");
+@@ -219,12 +236,6 @@
+ } else if (!strcmp(start, "script")) {
+ size_t len;
+
+- if (overrideList != override) {
+- parseError(*lineNum, "script directive may not occur "
+- "inside of device specification");
+- return 1;
+- }
+-
+ poptParseArgvString(rest, &argc, &argv);
+
+ if (argc != 1) {
+Common subdirectories: pump-0.8.21/debian and /local/pump/pump-0.8.21-r9/debian
+diff -u pump-0.8.21/dhcp.c /local/pump/pump-0.8.21-r9/dhcp.c
+--- pump-0.8.21/dhcp.c 2006-03-18 09:31:33.000000000 +0000
++++ /local/pump/pump-0.8.21-r9/dhcp.c 2006-03-18 09:14:57.000000000 +0000
+@@ -203,16 +203,30 @@
+
+ char * pumpDisableInterface(struct pumpNetIntf * intf) {
+ struct ifreq req;
++ struct sockaddr_in * addrp;
+ int s;
+
+ if (intf->flags & PUMP_FLAG_NOSETUP)
+ return NULL;
+
+ s = socket(AF_INET, SOCK_DGRAM, 0);
+-
+- memset(&req,0,sizeof(req));
+
++ memset(&req,0,sizeof(req));
+ strcpy(req.ifr_name, intf->device);
++
++ addrp = (struct sockaddr_in *) &req.ifr_addr;
++ addrp->sin_family = AF_INET;
++ addrp->sin_addr.s_addr = 0;
++ if (ioctl(s, SIOCSIFADDR, &req)) {
++ close(s);
++ return perrorstr("SIOCSIFADDR");
++ }
++
++ if (intf->override.flags & OVERRIDE_FLAG_KEEPUP) {
++ close(s);
++ return NULL;
++ }
++
+ if (ioctl(s, SIOCGIFFLAGS, &req)) {
+ close(s);
+ return perrorstr("SIOCGIFFLAGS");
+@@ -282,18 +296,27 @@
+ goto out;
+ }
+
+- if (!strcmp(intf->device, "lo")) {
+- /* add a route for this network */
+- route.rt_dev = intf->device;
+- route.rt_flags = RTF_UP;
+- route.rt_metric = 0;
++ route.rt_dev = intf->device;
++ route.rt_flags = RTF_UP;
++ route.rt_metric = 0;
++
++ addrp->sin_family = AF_INET;
++ addrp->sin_port = 0;
++ addrp->sin_addr = intf->network;
++ memcpy(&route.rt_dst, addrp, sizeof(*addrp));
++ addrp->sin_addr = intf->netmask;
++ memcpy(&route.rt_genmask, addrp, sizeof(*addrp));
++
++ if (strcmp(intf->device,"lo") && intf->override.routeMetric) {
++ if (ioctl(s, SIOCDELRT, &route)) {
++ rc = perrorstr("SIOCDELRT");
++ goto out;
++ }
++ }
+
+- addrp->sin_family = AF_INET;
+- addrp->sin_port = 0;
+- addrp->sin_addr = intf->network;
+- memcpy(&route.rt_dst, addrp, sizeof(*addrp));
+- addrp->sin_addr = intf->netmask;
+- memcpy(&route.rt_genmask, addrp, sizeof(*addrp));
++ if (!strcmp(intf->device, "lo") || intf->override.routeMetric) {
++ if (intf->override.routeMetric)
++ route.rt_metric = intf->override.routeMetric + 1;
+
+ if (ioctl(s, SIOCADDRT, &route)) {
+ /* the route cannot already exist, as we've taken the device down */
+@@ -307,31 +330,37 @@
+ return rc;
+ }
+
+-int pumpSetupDefaultGateway(struct in_addr * gw) {
++int pumpSetupDefaultGateway(struct pumpNetIntf * intf) {
+ struct sockaddr_in addr;
+ struct rtentry route;
+ int s;
++ int i;
+
+ s = socket(AF_INET, SOCK_DGRAM, 0);
+-
+- memset(&addr,0,sizeof(addr));
+- memset(&route,0,sizeof(route));
+- addr.sin_family = AF_INET;
+- addr.sin_port = 0;
+- addr.sin_addr.s_addr = INADDR_ANY;
+- memcpy(&route.rt_dst, &addr, sizeof(addr));
+- memcpy(&route.rt_genmask, &addr, sizeof(addr));
+- addr.sin_addr = *gw;
+- memcpy(&route.rt_gateway, &addr, sizeof(addr));
+-
+- route.rt_flags = RTF_UP | RTF_GATEWAY;
+- route.rt_metric = 0;
+- route.rt_dev = NULL;
+
+- if (ioctl(s, SIOCADDRT, &route)) {
+- close(s);
+- syslog(LOG_ERR, "failed to set default route: %s", strerror(errno));
+- return -1;
++ for (i = intf->numGateways - 1; i >= 0; i--) {
++ memset(&addr,0,sizeof(addr));
++ memset(&route,0,sizeof(route));
++ addr.sin_family = AF_INET;
++ addr.sin_port = 0;
++ addr.sin_addr.s_addr = INADDR_ANY;
++ memcpy(&route.rt_dst, &addr, sizeof(addr));
++ memcpy(&route.rt_genmask, &addr, sizeof(addr));
++ addr.sin_addr = intf->gateways[i];
++ memcpy(&route.rt_gateway, &addr, sizeof(addr));
++
++ route.rt_flags = RTF_UP | RTF_GATEWAY;
++ route.rt_dev = intf->device;
++ if (intf->override.routeMetric)
++ route.rt_metric = intf->override.routeMetric + 1;
++ else
++ route.rt_metric = 0;
++
++ if (ioctl(s, SIOCADDRT, &route)) {
++ close(s);
++ syslog(LOG_ERR, "failed to set default route: %s", strerror(errno));
++ return -1;
++ }
+ }
+
+ close(s);
+@@ -377,7 +406,7 @@
+ unsigned char option, length;
+
+
+- chptr = response->vendor;
++ chptr = (unsigned char *) response->vendor;
+
+ chptr += 4;
+ while (*chptr != 0xFF) {
+@@ -454,7 +483,7 @@
+ intf->set |= PUMP_INTFINFO_HAS_NEXTSERVER;
+ syslog (LOG_DEBUG, "intf: next server: %s", inet_ntoa (intf->nextServer));
+
+- chptr = breq->vendor;
++ chptr = (unsigned char *) breq->vendor;
+ chptr += 4;
+ while (*chptr != 0xFF && (void *) chptr < (void *) breq->vendor + DHCP_VENDOR_LENGTH) {
+ option = *chptr++;
+@@ -710,7 +739,7 @@
+ syslog (LOG_DEBUG, "%s: servername: %s", name, breq->servername);
+ syslog (LOG_DEBUG, "%s: bootfile: %s", name, breq->bootfile);
+
+- vndptr = breq->vendor;
++ vndptr = (unsigned char *) breq->vendor;
+ sprintf (vendor, "0x%02x 0x%02x 0x%02x 0x%02x", vndptr[0], vndptr[1], vndptr[2], vndptr[3]);
+ vndptr += 4;
+ syslog (LOG_DEBUG, "%s: vendor: %s", name, vendor);
+@@ -722,7 +751,7 @@
+ if (option == 0xFF)
+ {
+ sprintf (vendor, "0x%02x", option);
+- vndptr = breq->vendor + DHCP_VENDOR_LENGTH;
++ vndptr = (unsigned char *)breq->vendor + DHCP_VENDOR_LENGTH;
+ }
+ else if (option == 0x00)
+ {
+@@ -765,10 +794,11 @@
+ fd_set readfs;
+ int i, j;
+ struct sockaddr_pkt tmpAddress;
++ socklen_t addrLength;
+ int gotit = 0;
+ int tries;
+ int nextTimeout = 2;
+- time_t timeoutTime;
++ time_t timeoutTime = 0;
+ int sin;
+ int resend = 1;
+ struct ethhdr;
+@@ -855,9 +885,9 @@
+ break;
+
+ case 1:
+- i = sizeof(tmpAddress);
++ addrLength = sizeof(tmpAddress);
+ if ((j = recvfrom(sin, ethPacket, sizeof(ethPacket), 0,
+- (struct sockaddr *) &tmpAddress, &i)) < 0)
++ (struct sockaddr *) &tmpAddress, &addrLength)) < 0)
+ return perrorstr("recvfrom");
+
+ /* We need to do some basic sanity checking of the header */
+@@ -969,7 +999,7 @@
+ unsigned char * chptr;
+ int theOption, theLength;
+
+- chptr = breq->vendor;
++ chptr = (unsigned char *) breq->vendor;
+ chptr += 4;
+ while (*chptr != 0xFF && *chptr != option) {
+ theOption = *chptr++;
+@@ -989,7 +1019,7 @@
+ unsigned char * chptr;
+ unsigned int length, theOption;
+
+- chptr = bresp->vendor;
++ chptr = (unsigned char *) bresp->vendor;
+ chptr += 4;
+ while (*chptr != 0xFF && *chptr != option) {
+ theOption = *chptr++;
+@@ -1261,7 +1291,7 @@
+ struct sockaddr_in serverAddr;
+ struct sockaddr_ll broadcastAddr;
+ struct bootpRequest breq, bresp;
+- unsigned char * chptr;
++ char * chptr;
+ time_t startTime = pumpUptime();
+ char * saveDeviceName;
+ unsigned char messageType;
+@@ -1432,7 +1462,7 @@
+ char * pumpDhcpRun(char * device, int flags, int reqLease,
+ char * reqHostname, struct pumpNetIntf * intf,
+ struct pumpOverrideInfo * override) {
+- pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
++ return pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
+ override);
+ }
+
+Common subdirectories: pump-0.8.21/po and /local/pump/pump-0.8.21-r9/po
+diff -u pump-0.8.21/pump.8 /local/pump/pump-0.8.21-r9/pump.8
+--- pump-0.8.21/pump.8 2006-03-18 09:31:33.000000000 +0000
++++ /local/pump/pump-0.8.21-r9/pump.8 2006-03-18 09:14:57.000000000 +0000
+@@ -1,5 +1,6 @@
+ .\" Copyright 1999 Red Hat Software, Inc.
+ .\" August 2004: Updated by Thomas Hood <jdthood@yahoo.co.uk>
++.\" July 2005: Updated by Roy Marples <uberlord@gentoo.org>
+ .\"
+ .\" This man page is free documentation; you can redistribute it and/or modify
+ .\" it under the terms of the GNU General Public License as published by
+@@ -29,8 +30,10 @@
+ .IR IFACE ]
+ .BR "" [ \-l | \-\-lease
+ .IR HOURS ]
++.BR "" [ \-m | \-\-route\-metric
++.IR METRIC ]
+ .BR "" [ \-\-lookup\-hostname ]
+-.BR "" [ \-\-no\-dns "] [" \-\-no\-gateway "] [" \-\-no\-setup "] [" \-\-no\-resolvconf ]
++.BR "" [ \-\-no\-dns "] [" \-\-no\-gateway "] [" \-\- no\-ntp "] [" \-\-no\-setup "]
+ .BR "" [ \-\-release "] [" \-\-renew "] [" \-\-script =
+ .IR ISCRIPT ]
+ .BR "" [ \-\-status ]
+@@ -67,13 +70,16 @@
+ \-d \-\-no\-dns Don't update DNS resolver configuration
+ \-h \-\-hostname=\fIHOSTNAME\fR Request \fIHOSTNAME\fR
+ \-i \-\-interface=\fIIFACE\fR Manage \fIIFACE\fR rather than eth0
++ \-\-keep\-up Keep the interface up when released
+ \-k \-\-kill Kill daemon (and disable all interfaces)
+ \-l \-\-lease=\fIHOURS\fR Request least time of \fIHOURS\fR
+ \-\-lookup\-hostname Look up hostname in DNS
+ \-R \-\-renew Renew lease immediately
+ \-r \-\-release Release interface
++\-m \-\-route-metric=\fIMETRIC\fR Metric to use on routes (normally 0)
+ \-\-no\-gateway Don't configurate a default route for this interface
+ \-\-no\-resolvconf Don't use the \fBresolvconf\fR program to update resolv.conf
++ \-\-no\-ntp Don't update ntp.conf
+ \-\-no\-setup Don't set up anything
+ \-\-script=\fISCRIPT\fR Call \fISCRIPT\fR (or null string to disable)
+ \-s \-\-status Display interface status
+@@ -164,8 +170,13 @@
+ Use \fISEARCHPATH\fR as the DNS search path instead of the domain
+ name returned by the server or the domain part of the fully
+ qualified hostname.
+-As a machine only has a single DNS search path, this directive may
+-only be used globally.
++
++.TP
++\fBkeepup\fR
++Keep the interface up when released.
++Normally \fBpump\fR brings the interface down when it releases its
++lease, but some daemons such as ifplugd or wpa_supplicant still need the
++interface to be up so that they can still work.
+
+ .TP
+ \fBnonisdomain\fR
+@@ -173,22 +184,24 @@
+ Normally \fBpump\fR sets the system's NIS domain
+ if an NIS domain is specified by the DHCP server
+ and the current NIS domain is empty or \fBlocaldomain\fR.
+-This directive may only be used within a \fBdevice\fR directive.
+
+ .TP
+ \fBnodns\fR
+ Don't update /etc/resolv.conf when the interface is configured.
+-This directive may only be used within a \fBdevice\fR directive.
+
+ .TP
+ \fBnogateway\fR
+ Ignore any default gateway suggested by the DHCP server for this device.
+-This can be useful on machines with multiple Ethernet cards.
++This can be useful on machines with multiple devices.
++
++.TP
++\fBnontp\fR
++Don't update /etc/ntp.conf when the interface is configured.
+
+ .TP
+ \fBnosetup\fR
+ Don't set up anything on the local machine as a result of DHCP operations.
+-This implies \fBnodns\fR, \fBnonisdomain\fR and \fBnogateway\fR.
++This implies \fBnodns\fR, \fBnonisdomain\fR, \fBnogateway\fR and \fBnontp\fR.
+ This option is useful, for example,
+ if you want to perform setup in customised scripts.
+
+diff -u pump-0.8.21/pump.c /local/pump/pump-0.8.21-r9/pump.c
+--- pump-0.8.21/pump.c 2006-03-18 09:31:33.000000000 +0000
++++ /local/pump/pump-0.8.21-r9/pump.c 2006-03-18 09:25:52.000000000 +0000
+@@ -188,9 +188,17 @@
+
+ errno = 0;
+
+- if (domain)
+- if(fprintf(f, "search %s\n", domain) < 0)
+- syslog(LOG_ERR, "failed to write resolver configuration data\n");
++ fprintf(f, "# Generated by pump for interface %s\n", intf->device);
++
++ if (domain) {
++ if (strchr(domain, ' ')) {
++ if(fprintf(f, "search %s\n", domain) < 0)
++ syslog(LOG_ERR, "failed to write resolver configuration data\n");
++ } else {
++ if(fprintf(f, "search %s\n", domain) < 0)
++ syslog(LOG_ERR, "failed to write resolver configuration data\n");
++ }
++ }
+
+ for (i = 0; i < intf->numDns; i++)
+ if(fprintf(f, "nameserver %s\n", inet_ntoa(intf->dnsServers[i])) < 0)
+@@ -301,35 +309,6 @@
+ free(arg);
+ }
+
+-static void callIfupPost(struct pumpNetIntf* intf) {
+-#ifdef debian
+- /* can/should we call a debian one? */
+- return;
+-#else
+- pid_t child;
+- char * argv[3];
+- char arg[64];
+-
+- argv[0] = "/etc/sysconfig/network-scripts/ifup-post";
+- snprintf(arg,64,"ifcfg-%s",intf->device);
+- argv[1] = arg;
+- argv[2] = NULL;
+-
+- if (!(child = fork())) {
+- /* send the script to init */
+- if (fork()) _exit(0);
+-
+- execvp(argv[0], argv);
+-
+- syslog(LOG_ERR,"failed to run %s: %s", argv[0], strerror(errno));
+-
+- _exit(0);
+- }
+-
+- waitpid(child, NULL, 0);
+-#endif
+-}
+-
+ static void callScript(char* script,int msg,struct pumpNetIntf* intf) {
+ pid_t child;
+ char * argv[20];
+@@ -393,12 +372,8 @@
+
+ syslog(LOG_INFO, "configured interface %s", intf->device);
+
+- if (!(o->flags & OVERRIDE_FLAG_NOGATEWAY)) {
+- int i;
+-
+- for (i = intf->numGateways - 1; i >= 0; i--)
+- pumpSetupDefaultGateway(&intf->gateways[i]);
+- }
++ if (!(o->flags & OVERRIDE_FLAG_NOGATEWAY))
++ pumpSetupDefaultGateway(intf);
+
+ setupDns(intf, o);
+ setupDomain(intf, o);
+@@ -416,7 +391,7 @@
+ static void runDaemon(int sock, int sock_in) {
+ int conn;
+ struct sockaddr_un addr;
+- int addrLength = sizeof(struct sockaddr_un);
++ socklen_t addrLength = sizeof(struct sockaddr_un);
+ struct command cmd;
+ struct pumpNetIntf intf[20];
+ const int maxIntf = sizeof(intf) / sizeof(intf[0]);
+@@ -510,7 +485,6 @@
+ } else {
+ callScript(intf[closest].override.script,
+ PUMP_SCRIPT_RENEWAL, &intf[closest]);
+- callIfupPost(&intf[closest]);
+ }
+
+ continue; /* recheck timeouts */
+@@ -613,7 +587,6 @@
+ if (!cmd.u.result) {
+ callScript(intf[i].override.script,
+ PUMP_SCRIPT_RENEWAL, intf + i);
+- callIfupPost(intf + i);
+ }
+ }
+ break;
+@@ -841,7 +814,6 @@
+ printf("\tNext server %s\n", inet_ntoa(i.nextServer));
+
+ if (i.numGateways) {
+- printf("\tGateway: %s\n", inet_ntoa(i.gateways[0]));
+ printf("\tGateways:");
+ for (j = 0; j < i.numGateways; j++)
+ printf(" %s", inet_ntoa(i.gateways[j]));
+@@ -925,12 +897,15 @@
+ int killDaemon = 0;
+ int winId = 0;
+ int release = 0, renew = 0, status = 0, lookupHostname = 0, nodns = 0;
+- int nogateway = 0, nobootp = 0;
++ int nogateway = 0, nobootp = 0, nontp = 0;
+ int nosetup = 0;
+ int noresolvconf = 0;
++ int routeMetric = 0;
++ int keepUp = 0;
+ struct command cmd, response;
+ char * configFile = "/etc/pump.conf";
+ char * script = NULL;
++ char * searchPath = NULL;
+ struct pumpOverrideInfo * overrides;
+ int cont;
+ struct poptOption options[] = {
+@@ -942,6 +917,8 @@
+ { "interface", 'i', POPT_ARG_STRING, &device, 0,
+ N_("Interface to configure (normally eth0)"),
+ N_("iface") },
++ { "keep-up", 'u', POPT_ARG_NONE, &keepUp, 0,
++ N_("Keep the interface up when releasing it") },
+ { "kill", 'k', POPT_ARG_NONE, &killDaemon, 0,
+ N_("Kill daemon (and disable all interfaces)"), NULL },
+ { "lease", 'l', POPT_ARG_INT, &lease_hrs, 0,
+@@ -954,7 +931,9 @@
+ N_("Release interface"), NULL },
+ { "renew", 'R', POPT_ARG_NONE, &renew, 0,
+ N_("Force immediate lease renewal"), NULL },
+- { "verbose", 'v', POPT_ARG_NONE, &verbose, 0,
++ { "route-metric", 'm', POPT_ARG_INT, &routeMetric, 0,
++ N_("Metric applied to routes (normally 0)"), N_("(metric)") },
++ { "verbose", 'v', POPT_ARG_NONE, &verbose, 0,
+ N_("Log verbose debug info"), NULL },
+ { "status", 's', POPT_ARG_NONE, &status, 0,
+ N_("Display interface status"), NULL },
+@@ -962,12 +941,16 @@
+ N_("Don't update resolv.conf"), NULL },
+ { "no-gateway", '\0', POPT_ARG_NONE, &nogateway, 0,
+ N_("Don't set a gateway for this interface"), NULL },
++ { "no-ntp", '\0', POPT_ARG_NONE, &nontp, 0,
++ N_("Don't update ntp.conf"), NULL },
+ { "no-setup", '\0', POPT_ARG_NONE, &nosetup, 0,
+ N_("Don't set up anything"), NULL },
+ { "no-resolvconf", '\0', POPT_ARG_NONE, &noresolvconf, 0,
+ N_("Don't set up resolvconf"), NULL },
+ { "no-bootp", '\0', POPT_ARG_NONE, &nobootp, 0,
+ N_("Ignore non-DHCP BOOTP responses"), NULL },
++ { "search-path", 'p', POPT_ARG_STRING, &searchPath, 0,
++ N_("Use this DNS search path instead of the supplied one"), NULL },
+ { "script", '\0', POPT_ARG_STRING, &script, 0,
+ N_("Script to use") },
+ { "win-client-ident", '\0', POPT_ARG_NONE, &winId, 0,
+@@ -1014,6 +997,11 @@
+ return 1;
+ }
+
++ if (searchPath && strlen(searchPath) > sizeof(overrides->searchPath)) {
++ fprintf(stderr, _("%s: --search-path argument is to long\n"), PROGNAME);
++ return 1;
++ }
++
+ if (script && strlen(script) > sizeof(overrides->script)) {
+ fprintf(stderr, _("%s: --script argument is too long\n"), PROGNAME);
+ return 1;
+@@ -1033,7 +1021,7 @@
+ flags |= PUMP_FLAG_WINCLIENTID;
+ if (lookupHostname)
+ flags |= PUMP_FLAG_FORCEHNLOOKUP;
+-
++
+ if (killDaemon) {
+ cmd.type = CMD_DIE;
+ } else if (status) {
+@@ -1069,14 +1057,22 @@
+ o->flags |= OVERRIDE_FLAG_NOBOOTP;
+ if (nogateway)
+ o->flags |= OVERRIDE_FLAG_NOGATEWAY;
++ if (nontp)
++ o->flags |= OVERRIDE_FLAG_NONTP;
+ if (nosetup)
+ o->flags |=
+ OVERRIDE_FLAG_NOSETUP |
+ OVERRIDE_FLAG_NODNS |
+ OVERRIDE_FLAG_NOGATEWAY |
++ OVERRIDE_FLAG_NONTP |
+ OVERRIDE_FLAG_NONISDOMAIN;
+ if (noresolvconf)
+ o->flags |= OVERRIDE_FLAG_NORESOLVCONF;
++ if (keepUp)
++ o->flags |= OVERRIDE_FLAG_KEEPUP;
++ o->routeMetric = routeMetric;
++ if (searchPath)
++ strcpy(o->searchPath, searchPath);
+ if (script)
+ strcpy(o->script, script);
+
+diff -u pump-0.8.21/pump.h /local/pump/pump-0.8.21-r9/pump.h
+--- pump-0.8.21/pump.h 2006-03-18 09:31:33.000000000 +0000
++++ /local/pump/pump-0.8.21-r9/pump.h 2006-03-18 09:14:57.000000000 +0000
+@@ -55,6 +55,8 @@
+ #define OVERRIDE_FLAG_NOBOOTP (1 << 3)
+ #define OVERRIDE_FLAG_NOSETUP (1 << 4)
+ #define OVERRIDE_FLAG_NORESOLVCONF (1 << 5)
++#define OVERRIDE_FLAG_NONTP (1 << 6)
++#define OVERRIDE_FLAG_KEEPUP (1 << 7)
+
+ struct pumpOverrideInfo {
+ char device[10];
+@@ -63,6 +65,7 @@
+ int numRetries;
+ int timeout;
+ char script[1024];
++ int routeMetric;
+ };
+
+ /* all of these in_addr things are in network byte order! */
+@@ -113,7 +116,7 @@
+ char * pumpDisableInterface(struct pumpNetIntf * intf);
+ int pumpDhcpRenew(struct pumpNetIntf * intf);
+ int pumpDhcpRelease(struct pumpNetIntf * intf);
+-int pumpSetupDefaultGateway(struct in_addr * gw);
++int pumpSetupDefaultGateway(struct pumpNetIntf * intf);
+ time_t pumpUptime(void);
+
+ #define RESULT_OKAY 0
diff --git a/net-misc/pump/pump-0.8.21-r9.ebuild b/net-misc/pump/pump-0.8.21-r9.ebuild
new file mode 100644
index 000000000000..c9f74f055474
--- /dev/null
+++ b/net-misc/pump/pump-0.8.21-r9.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/pump-0.8.21-r9.ebuild,v 1.1 2006/04/07 23:59:37 uberlord Exp $
+
+inherit eutils
+
+PATCHLEVEL="2"
+
+DESCRIPTION="This is the DHCP/BOOTP client written by RedHat"
+HOMEPAGE="http://ftp.debian.org/debian/pool/main/p/pump/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/p/${PN}/${PN}_${PV}-${PATCHLEVEL}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/popt-1.5"
+RDEPEND="${DEPEND}"
+
+PROVIDE="virtual/dhcpc"
+
+src_unpack() {
+ cd "${WORKDIR}"
+ unpack "${PN}_${PV}.orig.tar.gz"
+ cd "${S}"
+
+ # Apply Debians pump patchset - they fix things good :)
+ epatch "${DISTDIR}/${PN}_${PV}-${PATCHLEVEL}.diff.gz"
+
+ # Enable the -m (--route-metric) option to specify the default
+ # metric applied to routes
+ # Enable the --keep-up option to keep interfaces up when we release
+ # Enable the creation of /etc/ntp.conf and the --no-ntp option
+ epatch "${FILESDIR}/pump-${PV}-gentoo-2.patch"
+
+ # Only install specific po files if LINGUAS is set
+ if [[ -n ${LINGUAS} ]]; then
+ cd po
+ local p
+ for l in $(ls *.po) ; do
+ [[ " ${LINGUAS} " != *" ${l%%.po} "* ]] && rm -f "${l}"
+ done
+ fi
+}
+
+src_compile() {
+ make DEB_CFLAGS="-fPIC ${CFLAGS}" pump || die
+}
+
+src_install() {
+ into /
+ dosbin pump || die
+
+ doman pump.8
+ dodoc CREDITS
+
+ into /usr/
+ dolib.a libpump.a
+ insinto /usr/include/
+ doins pump.h
+
+ make -C po install datadir="${D}/usr/share/"
+}