summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-09-29 23:26:59 +0000
committerRoy Marples <uberlord@gentoo.org>2006-09-29 23:26:59 +0000
commit7d7b91a665092af9886a16466aa03c5038f474da (patch)
treedc1e92afcb72117f284224e597f6c456db9e91a6 /net-misc/pump
parentAdded ~x86-fbsd keyword. (diff)
downloadhistorical-7d7b91a665092af9886a16466aa03c5038f474da.tar.gz
historical-7d7b91a665092af9886a16466aa03c5038f474da.tar.bz2
historical-7d7b91a665092af9886a16466aa03c5038f474da.zip
Punt old versions
Package-Manager: portage-2.1.2_pre1-r4
Diffstat (limited to 'net-misc/pump')
-rw-r--r--net-misc/pump/Manifest34
-rw-r--r--net-misc/pump/files/digest-pump-0.8.21-r76
-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/files/pump-0.8.21-gentoo.diff656
-rw-r--r--net-misc/pump/pump-0.8.21-r7.ebuild56
-rw-r--r--net-misc/pump/pump-0.8.21-r9.ebuild64
7 files changed, 0 insertions, 1433 deletions
diff --git a/net-misc/pump/Manifest b/net-misc/pump/Manifest
index 8bfa4d428889..8c1ba105740c 100644
--- a/net-misc/pump/Manifest
+++ b/net-misc/pump/Manifest
@@ -1,30 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-AUX pump-0.8.21-gentoo-2.patch 19762 RMD160 1f4675fbe67a391b056f1e0de7bdbe666f9b5f28 SHA1 8997d9e49f1d6a99711e2afaf016479cf79fc6ab SHA256 2c8851718c8a7b6db975f13690ff5e115ef70b0076197cf3152778ab575af1fc
-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
-AUX pump-0.8.21-gentoo.diff 20131 RMD160 7d5c6200395bb574577d018e5c4f4ada8377cae6 SHA1 aaa18389fbe150655f21c769bc709fb83867f9ff SHA256 5f3f61f4a7672175e792fb48c38b2c8afb7afaf1ce353f5a645f09cc554abe98
-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
AUX pump-0.8.24-gentoo.patch 17176 RMD160 e3f082c03b6ec24063318aa94f25759f4f69727f SHA1 4bf9893ea888f9ce39d3cd3e1a5d5a492eea13bd SHA256 c68a0f43797d0c845fa3a08a33134035032a9c1bec1dc2cf612a1768d81117fa
MD5 cc32c61fb2421420bb01e8a55babb951 files/pump-0.8.24-gentoo.patch 17176
RMD160 e3f082c03b6ec24063318aa94f25759f4f69727f files/pump-0.8.24-gentoo.patch 17176
SHA256 c68a0f43797d0c845fa3a08a33134035032a9c1bec1dc2cf612a1768d81117fa files/pump-0.8.24-gentoo.patch 17176
-DIST pump_0.8.21-2.diff.gz 22259 RMD160 72438041c50f75e49f07d3361652683ae72032e3 SHA256 4f1cd3c8722a5b05a8a3ece404ec9a4cb0bd0e2a42130489f12ee4a27a51241c
-DIST pump_0.8.21.orig.tar.gz 79289 RMD160 0e911d101aba6757f680dddaecbac479df61fdb1 SHA256 3534015b2e045f7422a6487ad31d6f47f6369029daad92cea8f218e749d84109
DIST pump_0.8.24-1.diff.gz 22547 RMD160 c6e34a72ea360f267801d20e15c9064eaa3728c7 SHA1 da384261d0bcba72c1fb8f99bcc4dbf3fb48b6bb SHA256 fa08bbcf061171b3aaecaea854061316bfeee860921ba77f742c2ffa099cea85
DIST pump_0.8.24.orig.tar.gz 79790 RMD160 5bb96340dc6f1016b354e2a22e6396e7098d23f4 SHA1 e4b5f39419f9f2f0f88ef53ce0647dab40d35058 SHA256 cbb423942a4295a07a23b76a02d645b76b4ac0b58c3a30076ad42c2ab80c2dba
-EBUILD pump-0.8.21-r7.ebuild 1444 RMD160 9c03696fb8deda2a8747dc5003bdf788ce84ae17 SHA1 5d25a279759428d2b97e62db38d587fa5431bb29 SHA256 f5416c3c9a14c5c836d5b15476d8d2bb6122970a7d0c9ec1d43a9843a4bab66b
-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
-EBUILD pump-0.8.21-r9.ebuild 1574 RMD160 c2802171cbb3f397d39d726b92edb5866220f563 SHA1 b2cb6404a326678c2181ff1538367bbf50ad0bd2 SHA256 785b8622fa85faef5059cd25ef99f4e77df5f33550e63f5319cd8fe20e28ca14
-MD5 2e31797ed523e2f4f1752dc2592cc3cd pump-0.8.21-r9.ebuild 1574
-RMD160 c2802171cbb3f397d39d726b92edb5866220f563 pump-0.8.21-r9.ebuild 1574
-SHA256 785b8622fa85faef5059cd25ef99f4e77df5f33550e63f5319cd8fe20e28ca14 pump-0.8.21-r9.ebuild 1574
EBUILD pump-0.8.24.ebuild 1571 RMD160 252a317b8bf77f96e1846158d9b556c4b2579551 SHA1 a43ed55ce07fe89c908b677a0138e0d510cd47d9 SHA256 92f56b11629bcb5eab3b4c5456d50065a74fc7a429543b47f9e6b73650ccb0fc
MD5 acf5bcdb5afed26e27dad945ece2e881 pump-0.8.24.ebuild 1571
RMD160 252a317b8bf77f96e1846158d9b556c4b2579551 pump-0.8.24.ebuild 1571
@@ -37,19 +16,6 @@ MISC metadata.xml 288 RMD160 906b4569fd44db0aff588a04ac9d895dd5ef7750 SHA1 4c1b4
MD5 94fe4b6cace933a6aaedd7fb52194eca metadata.xml 288
RMD160 906b4569fd44db0aff588a04ac9d895dd5ef7750 metadata.xml 288
SHA256 175c6563e7dd812572c496f8e8c03471b18f00b04a5c62e6c59222ad304c1c08 metadata.xml 288
-MD5 a2c15f5738bc332e75ab261b6ae707e2 files/digest-pump-0.8.21-r7 488
-RMD160 53495658ffe3748a20f85f4cef53d6737077900d files/digest-pump-0.8.21-r7 488
-SHA256 e2777a640b14733389f47fc4d44dfbb828aa1793d207e38bd8c5c26ad9b7def5 files/digest-pump-0.8.21-r7 488
-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 f6532b7d7e0ae1c2bd4ae1d80a966600 files/digest-pump-0.8.24 488
RMD160 16093ffa996de074ae0080a66737294d361d01c2 files/digest-pump-0.8.24 488
SHA256 62904a92b319e7d3ebfb55427522872444019ce276134bfb016f4d4fcb55d006 files/digest-pump-0.8.24 488
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-iD8DBQFFGLyVamhnQswr0vIRArsCAKCzWEo8cJxppVU5KFDpQ1OknKJaYQCeL+0e
-mYonwg/+BQsV4HFio5bXkI4=
-=AceZ
------END PGP SIGNATURE-----
diff --git a/net-misc/pump/files/digest-pump-0.8.21-r7 b/net-misc/pump/files/digest-pump-0.8.21-r7
deleted file mode 100644
index fb2170369e99..000000000000
--- a/net-misc/pump/files/digest-pump-0.8.21-r7
+++ /dev/null
@@ -1,6 +0,0 @@
-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/digest-pump-0.8.21-r9 b/net-misc/pump/files/digest-pump-0.8.21-r9
deleted file mode 100644
index fb2170369e99..000000000000
--- a/net-misc/pump/files/digest-pump-0.8.21-r9
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index 85e847a24101..000000000000
--- a/net-misc/pump/files/pump-0.8.21-gentoo-2.patch
+++ /dev/null
@@ -1,611 +0,0 @@
-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/files/pump-0.8.21-gentoo.diff b/net-misc/pump/files/pump-0.8.21-gentoo.diff
deleted file mode 100644
index 62388b551812..000000000000
--- a/net-misc/pump/files/pump-0.8.21-gentoo.diff
+++ /dev/null
@@ -1,656 +0,0 @@
-diff -U 0 pump-0.8.21/config.c pump-0.8.21-r7/config.c
---- pump-0.8.21/config.c 2005-07-15 17:14:04.000000000 +0100
-+++ pump-0.8.21-r7/config.c 2005-07-15 14:48:32.000000000 +0100
-@@ -158 +158,18 @@
-- } else if (!strcmp(start, "domainsearch")) {
-+ } else if (!strcmp(start, "routemetric")) {
-+ poptParseArgvString(rest, &argc, &argv);
-+
-+ if (argc != 1) {
-+ parseError(*lineNum, "routemetric directive expects a "
-+ "single argument");
-+ return 1;
-+ }
-+
-+ num = strtol(argv[0], &chptr, 0);
-+ if (*chptr) {
-+ parseError(*lineNum, "routemetric requires a numeric "
-+ "argument");
-+ return 1;
-+ }
-+
-+ override->routeMetric = num;
-+ } else if (!strcmp(start, "etcdir")) {
-@@ -161,3 +178,11 @@
-- if (overrideList != override) {
-- parseError(*lineNum, "domainsearch directive may not occur "
-- "inside of device specification");
-+ poptParseArgvString(rest, &argc, &argv);
-+
-+ if (argc != 1) {
-+ parseError(*lineNum, "etcdir directive expects a "
-+ "single argument");
-+ return 1;
-+ }
-+
-+ len = strlen(argv[0]);
-+ if (len >= sizeof(override->etcDir)) {
-+ parseError(*lineNum, "etcdir directive is too long");
-@@ -166,0 +192,10 @@
-+ /*
-+ We don't free this as other configurations may have inherited
-+ it. This could be the wrong decision, but leak would be tiny
-+ so why worry?
-+ */
-+ memcpy(override->etcDir, argv[0], len + 1);
-+ free(argv);
-+ } else if (!strcmp(start, "domainsearch")) {
-+ size_t len;
-+
-@@ -211,0 +247,6 @@
-+ } else if (!strcmp(start, "nontp")) {
-+ if (*rest) {
-+ parseError(*lineNum, "unexpected argument to nontp directive");
-+ return 1;
-+ }
-+ override->flags |= OVERRIDE_FLAG_NONTP;
-@@ -222,6 +262,0 @@
-- } else if (!strcmp(start, "noresolvconf")) {
-- if (*rest) {
-- parseError(*lineNum, "unexpected argument to noresolvconf directive");
-- return 1;
-- }
-- override->flags |= OVERRIDE_FLAG_NORESOLVCONF;
-@@ -231,6 +265,0 @@
-- if (overrideList != override) {
-- parseError(*lineNum, "script directive may not occur "
-- "inside of device specification");
-- return 1;
-- }
--
-Common subdirectories: pump-0.8.21/debian and pump-0.8.21-r7/debian
-diff -U 0 pump-0.8.21/dhcp.c pump-0.8.21-r7/dhcp.c
---- pump-0.8.21/dhcp.c 2005-07-15 17:14:04.000000000 +0100
-+++ pump-0.8.21-r7/dhcp.c 2005-07-15 14:48:32.000000000 +0100
-@@ -205,0 +206 @@
-+ struct sockaddr_in * addrp;
-@@ -212,2 +212,0 @@
--
-- memset(&req,0,sizeof(req));
-@@ -214,0 +214 @@
-+ memset(&req,0,sizeof(req));
-@@ -215,0 +216,14 @@
-+
-+ 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;
-+ }
-+
-@@ -285,5 +299,17 @@
-- 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;
-+ }
-+ }
-@@ -291,6 +317,3 @@
-- 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;
-@@ -310 +333 @@
--int pumpSetupDefaultGateway(struct in_addr * gw) {
-+int pumpSetupDefaultGateway(struct pumpNetIntf * intf) {
-@@ -313,0 +337 @@
-+ int i;
-@@ -316,14 +339,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;
-@@ -331,4 +341,23 @@
-- 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;
-+ }
-@@ -1435 +1464 @@
-- pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
-+ return pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
-Common subdirectories: pump-0.8.21/po and pump-0.8.21-r7/po
-diff -U 0 pump-0.8.21/pump.8 pump-0.8.21-r7/pump.8
---- pump-0.8.21/pump.8 2005-07-15 17:14:04.000000000 +0100
-+++ pump-0.8.21-r7/pump.8 2005-07-15 14:48:32.000000000 +0100
-@@ -2,0 +3 @@
-+.\" July 2005: Updated by Roy Marples <uberlord@gentoo.org>
-@@ -31,0 +33,2 @@
-+.BR "" [ \-m | \-\-route\-metric
-+.IR METRIC ]
-@@ -33 +36 @@
--.BR "" [ \-\-no\-dns "] [" \-\-no\-gateway "] [" \-\-no\-setup "] [" \-\-no\-resolvconf ]
-+.BR "" [ \-\-no\-dns "] [" \-\-no\-gateway "] [" \-\- no\-ntp "] [" \-\-no\-setup "]
-@@ -67 +70,2 @@
--\-d \-\-no\-dns Don't update DNS resolver configuration
-+\-e \-\-etc\-dir=\fIDIR\fR Directory to create conf files (normally /etc)
-+\-d \-\-no\-dns Don't update resolv.conf
-@@ -69,0 +74 @@
-+ \-\-keep\-up Keep the interface up when released
-@@ -74,0 +80 @@
-+\-m \-\-route-metric=\fIMETRIC\fR Metric to use on routes (normally 0)
-@@ -76 +82 @@
-- \-\-no\-resolvconf Don't use the \fBresolvconf\fR program to update resolv.conf
-+ \-\-no\-ntp Don't update ntp.conf
-@@ -162,0 +169,4 @@
-+\fBetcdir\fR \fIETCDIRECTORY\fR
-+Store resolv.conf and/or ntp.conf in this directory (normally /etc).
-+
-+.TP
-@@ -167,2 +177,7 @@
--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.
-@@ -176 +190,0 @@
--This directive may only be used within a \fBdevice\fR directive.
-@@ -181 +194,0 @@
--This directive may only be used within a \fBdevice\fR directive.
-@@ -186 +199,5 @@
--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.
-@@ -191 +208 @@
--This implies \fBnodns\fR, \fBnonisdomain\fR and \fBnogateway\fR.
-+This implies \fBnodns\fR, \fBnonisdomain\fR, \fBnogateway\fR and \fBnontp\fR.
-@@ -196,8 +212,0 @@
--\fBnoresolvconf\fR
--Don't use the resolvconf program to update /etc/resolv.conf;
--instead, update /etc/resolv.conf directly.
--(This option is only relevant if
--.B \-\-nodns
--is not used.)
--
--.TP
-@@ -207,0 +217,6 @@
-+\fBroutemetric\fR \fIMETRIC\fR
-+Metric assigned to each route (normally 0).
-+Metric decide a priority when choosing where to route network traffic.
-+Lower metrics take a higher priority.
-+
-+.TP
-diff -U 0 pump-0.8.21/pump.c pump-0.8.21-r7/pump.c
---- pump-0.8.21/pump.c 2005-07-15 17:14:04.000000000 +0100
-+++ pump-0.8.21-r7/pump.c 2005-07-15 17:09:01.000000000 +0100
-@@ -100,111 +100,2 @@
--char * readSearchPath(void) {
-- int fd;
-- struct stat sb;
-- char * buf;
-- char * start;
--
-- fd = open("/etc/resolv.conf", O_RDONLY);
-- if (fd < 0) return NULL;
--
-- fstat(fd, &sb);
-- buf = alloca(sb.st_size + 2);
-- if (read(fd, buf, sb.st_size) != sb.st_size) return NULL;
-- buf[sb.st_size] = '\n';
-- buf[sb.st_size + 1] = '\0';
-- close(fd);
--
-- start = buf;
-- while (start && *start) {
-- while (isspace(*start) && (*start != '\n')) start++;
-- if (*start == '\n') {
-- start++;
-- continue;
-- }
--
-- if (!strncmp("search", start, 6) && isspace(start[6])) {
-- start += 6;
-- while (isspace(*start) && *start != '\n') start++;
-- if (*start == '\n') return NULL;
--
-- buf = strchr(start, '\n');
-- *buf = '\0';
-- return strdup(start);
-- }
--
-- while (*start && (*start != '\n')) start++;
-- }
--
-- return NULL;
--}
--
--static void createResolvConf(struct pumpNetIntf * intf, struct pumpOverrideInfo * override, char * domain) {
-- FILE * f;
-- int i;
-- char * chptr;
-- int resolvconf;
--
-- /* force a reread of /etc/resolv.conf if we need it again */
-- res_close();
-- endhostent();
--
-- if (!domain) {
-- domain = readSearchPath();
-- if (domain) {
-- chptr = alloca(strlen(domain) + 1);
-- strcpy(chptr, domain);
-- free(domain);
-- domain = chptr;
-- }
-- }
--
-- resolvconf = !(override->flags & OVERRIDE_FLAG_NORESOLVCONF);
-- if (resolvconf) {
-- struct stat buf;
--
-- if (stat("/sbin/resolvconf", &buf) < 0)
-- resolvconf = 0;
-- }
--
-- if (resolvconf) {
-- char *arg;
--
-- f = NULL;
-- if (asprintf(&arg, "/sbin/resolvconf -a %s >/dev/null 2>&1", intf->device) >= 0) {
-- f = popen(arg, "w");
-- free(arg);
-- }
-- if (!f) {
-- syslog(LOG_ERR, "error starting resolvconf: %s\n", strerror(errno));
-- return;
-- }
-- } else {
-- f = fopen("/etc/resolv.conf", "w");
-- if (!f) {
-- syslog(LOG_ERR, "error opening resolv.conf: %s\n", strerror(errno));
-- return;
-- }
-- }
--
--
-- errno = 0;
--
-- if (domain)
-- 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)
-- syslog(LOG_ERR, "failed to write resolver configuration data\n");
--
-- if (resolvconf) {
-- if(pclose(f) != 0) /* errno not useful on pclose failure */
-- syslog(LOG_ERR, "error running resolvconf\n");
-- } else {
-- if(fclose(f) != 0)
-- syslog(LOG_ERR, "error closing resolv.conf: %s\n", strerror(errno));
-- }
--
--}
--
--void setupDomain(struct pumpNetIntf * intf,
-- struct pumpOverrideInfo * override) {
-+void setupDomain(struct pumpNetIntf * intf) {
-+ struct pumpOverrideInfo *o = &intf->override;
-@@ -214 +105 @@
-- if (override->flags & OVERRIDE_FLAG_NONISDOMAIN)
-+ if (o->flags & OVERRIDE_FLAG_NONISDOMAIN)
-@@ -234 +125 @@
-- if (setdomainname(intf->domain, strlen(intf->domain))) {
-+ if (setdomainname(intf->nisDomain, strlen(intf->nisDomain))) {
-@@ -242,7 +133,5 @@
--void setupDns(struct pumpNetIntf * intf, struct pumpOverrideInfo * override) {
-- char * hn, * dn = NULL;
-- struct hostent * he;
--
-- if (override->flags & OVERRIDE_FLAG_NODNS) {
-- return;
-- }
-+void createResolvConf(struct pumpNetIntf * intf, char * domain) {
-+ struct pumpOverrideInfo *o = &intf->override;
-+ FILE * f;
-+ char resolv[1024];
-+ int i;
-@@ -250,2 +139,4 @@
-- if (override->searchPath[0]) {
-- createResolvConf(intf, override, override->searchPath);
-+ sprintf(resolv, "%s/resolv.conf", o->etcDir);
-+ f = fopen(resolv, "w");
-+ if (!f) {
-+ syslog(LOG_ERR, "cannot create %s: %s", resolv, strerror(errno));
-@@ -254,22 +145,5 @@
--
-- if (intf->set & PUMP_NETINFO_HAS_DNS) {
-- if (!(intf->set & PUMP_NETINFO_HAS_DOMAIN)) {
-- if (intf->set & PUMP_NETINFO_HAS_HOSTNAME) {
-- hn = intf->hostname;
-- } else {
-- createResolvConf(intf, override, NULL);
--
-- he = gethostbyaddr((char *) &intf->ip, sizeof(intf->ip),
-- AF_INET);
-- if (he) {
-- hn = he->h_name;
-- } else {
-- hn = NULL;
-- }
-- }
--
-- if (hn) {
-- dn = strchr(hn, '.');
-- if (dn)
-- dn++;
-- }
-+
-+ fprintf(f, "# Generated by pump for interface %s\n", intf->device);
-+ if (domain) {
-+ if (strchr(domain, ' ')) {
-+ fprintf(f, "search %s\n", domain);
-@@ -277 +151 @@
-- dn = intf->domain;
-+ fprintf(f, "domain %s\n", domain);
-@@ -278,0 +153 @@
-+ }
-@@ -280 +155,2 @@
-- createResolvConf(intf, override, dn);
-+ for (i = 0; i < intf->numDns; i++) {
-+ fprintf(f, "nameserver %s\n", inet_ntoa(intf->dnsServers[i]));
-@@ -281,0 +158,2 @@
-+
-+ fclose(f);
-@@ -284,3 +162,4 @@
--void unsetupDns(struct pumpNetIntf * intf, struct pumpOverrideInfo * override) {
-- struct stat buf;
-- char *arg;
-+void setupDns(struct pumpNetIntf * intf) {
-+ struct pumpOverrideInfo *o = &intf->override;
-+ char * hn = NULL, * dn = NULL;
-+ struct hostent * he;
-@@ -288 +167 @@
-- if (override->flags & OVERRIDE_FLAG_NODNS)
-+ if (o->flags & OVERRIDE_FLAG_NODNS)
-@@ -290,6 +169,2 @@
-- if (override->flags & OVERRIDE_FLAG_NORESOLVCONF)
-- return;
-- if (stat("/sbin/resolvconf", &buf) < 0)
-- return;
-- if (asprintf(&arg, "/sbin/resolvconf -d %s", intf->device) < 0) {
-- syslog(LOG_ERR, "failed to release resolvconf: %s", strerror(errno));
-+
-+ if (!intf->set & PUMP_NETINFO_HAS_DNS)
-@@ -296,0 +172,22 @@
-+
-+ if (o->searchPath[0]) {
-+ dn = o->searchPath;
-+ } else if (intf->set & PUMP_NETINFO_HAS_DOMAIN) {
-+ dn = intf->domain;
-+ } else if (intf->set & PUMP_NETINFO_HAS_HOSTNAME) {
-+ hn = intf->hostname;
-+ } else {
-+ createResolvConf(intf, NULL);
-+
-+ he = gethostbyaddr((char *) &intf->ip, sizeof(intf->ip), AF_INET);
-+ if (he) {
-+ hn = he->h_name;
-+ } else {
-+ hn = NULL;
-+ }
-+ }
-+
-+ if (hn) {
-+ dn = strchr(hn, '.');
-+ if (dn)
-+ dn++;
-@@ -299,3 +196 @@
-- if (system(arg) != 0)
-- syslog(LOG_ERR, "resolvconf -d %s failed", intf->device);
-- free(arg);
-+ createResolvConf(intf, dn);
-@@ -304,8 +199,5 @@
--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];
-+void setupNtp(struct pumpNetIntf * intf) {
-+ struct pumpOverrideInfo *o = &intf->override;
-+ FILE * f;
-+ char ntp[1024];
-+ int i;
-@@ -313,4 +205,2 @@
-- argv[0] = "/etc/sysconfig/network-scripts/ifup-post";
-- snprintf(arg,64,"ifcfg-%s",intf->device);
-- argv[1] = arg;
-- argv[2] = NULL;
-+ if (o->flags & OVERRIDE_FLAG_NONTP)
-+ return;
-@@ -318,3 +208,2 @@
-- if (!(child = fork())) {
-- /* send the script to init */
-- if (fork()) _exit(0);
-+ if (! intf->set & PUMP_NETINFO_HAS_NTPSRVS)
-+ return;
-@@ -322 +211,6 @@
-- execvp(argv[0], argv);
-+ sprintf(ntp, "%s/ntp.conf", o->etcDir);
-+ f = fopen(ntp, "w");
-+ if (!f) {
-+ syslog(LOG_ERR, "cannot create %s: %s\n", ntp, strerror(errno));
-+ return;
-+ }
-@@ -324 +218,4 @@
-- syslog(LOG_ERR,"failed to run %s: %s", argv[0], strerror(errno));
-+ fprintf(f, "# Generated by pump for interface %s\n", intf->device);
-+ fprintf(f, "restrict default noquery notrust nomodify\n"
-+ "restrict 127.0.0.1\n"
-+ "driftfile /var/lib/ntp/ntp.drift\n");
-@@ -326 +223,4 @@
-- _exit(0);
-+ for (i = 0; i < intf->numNtp; i++) {
-+ fprintf(f, "restrict %s nomodify notrap noquery\n"
-+ "server %s\n", inet_ntoa(intf->ntpServers[i]),
-+ inet_ntoa(intf->ntpServers[i]));
-@@ -329,2 +229 @@
-- waitpid(child, NULL, 0);
--#endif
-+ fclose(f);
-@@ -333 +232 @@
--static void callScript(char* script,int msg,struct pumpNetIntf* intf) {
-+static void callScript(struct pumpNetIntf *intf, int msg) {
-@@ -337,0 +237 @@
-+ char * script = intf->override.script;
-@@ -388 +287,0 @@
--
-@@ -397,4 +296 @@
-- int i;
--
-- for (i = intf->numGateways - 1; i >= 0; i--)
-- pumpSetupDefaultGateway(&intf->gateways[i]);
-+ pumpSetupDefaultGateway(intf);
-@@ -403,8 +299,3 @@
-- setupDns(intf, o);
-- setupDomain(intf, o);
--
-- callScript(o->script, PUMP_SCRIPT_NEWLEASE, intf);
--}
--
--static void killLease(struct pumpNetIntf *intf) {
-- struct pumpOverrideInfo *o = &intf->override;
-+ setupDns(intf);
-+ setupDomain(intf);
-+ setupNtp(intf);
-@@ -412,2 +303 @@
-- unsetupDns(intf, o);
-- callScript(o->script, PUMP_SCRIPT_DOWN, intf);
-+ callScript(intf, PUMP_SCRIPT_NEWLEASE);
-@@ -502 +392 @@
-- killLease(intf + closest);
-+ callScript(intf + closest, PUMP_SCRIPT_DOWN);
-@@ -504 +394 @@
-- killLease(intf + closest);
-+ callScript(intf + closest, PUMP_SCRIPT_DOWN);
-@@ -511,3 +401 @@
-- callScript(intf[closest].override.script,
-- PUMP_SCRIPT_RENEWAL, &intf[closest]);
-- callIfupPost(&intf[closest]);
-+ callScript(&intf[closest], PUMP_SCRIPT_RENEWAL);
-@@ -576 +464 @@
-- killLease(intf + i);
-+ callScript(intf + i, PUMP_SCRIPT_DOWN);
-@@ -614,3 +502 @@
-- callScript(intf[i].override.script,
-- PUMP_SCRIPT_RENEWAL, intf + i);
-- callIfupPost(intf + i);
-+ callScript(intf + 1, PUMP_SCRIPT_RENEWAL);
-@@ -628 +514 @@
-- killLease(intf + i);
-+ callScript(intf + i, PUMP_SCRIPT_DOWN);
-@@ -844 +729,0 @@
-- printf("\tGateway: %s\n", inet_ntoa(i.gateways[0]));
-@@ -928 +813 @@
-- int nogateway = 0, nobootp = 0;
-+ int nogateway = 0, nobootp = 0, nontp = 0;
-@@ -930 +815,2 @@
-- int noresolvconf = 0;
-+ int routeMetric = 0;
-+ int keepUp = 0;
-@@ -933,0 +820,2 @@
-+ char * etcDir = "/etc";
-+ char * searchPath = NULL;
-@@ -939,0 +828,2 @@
-+ { "etc-dir", 'e', POPT_ARG_STRING, &etcDir, 0,
-+ N_("Directory to store resolv.conf (normally /etc)") },
-@@ -944,0 +835,2 @@
-+ { "keep-up", 'u', POPT_ARG_NONE, &keepUp, 0,
-+ N_("Keep the interface up when releasing it") },
-@@ -957 +849,3 @@
-- { "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,
-@@ -964,0 +859,2 @@
-+ { "no-ntp", '\0', POPT_ARG_NONE, &nontp, 0,
-+ N_("Don't update ntp.conf"), NULL },
-@@ -967,2 +862,0 @@
-- { "no-resolvconf", '\0', POPT_ARG_NONE, &noresolvconf, 0,
-- N_("Don't set up resolvconf"), NULL },
-@@ -970,0 +865,2 @@
-+ { "search-path", 'p', POPT_ARG_STRING, &searchPath, 0,
-+ N_("Use this DNS search path instead of the supplied one"), NULL },
-@@ -1016,0 +913,10 @@
-+ if (etcDir && strlen(etcDir) + 12 > sizeof(overrides->etcDir)) {
-+ fprintf(stderr, _("%s: --etc-dir argument is to long\n"), PROGNAME);
-+ return 1;
-+ }
-+
-+ if (searchPath && strlen(searchPath) > sizeof(overrides->searchPath)) {
-+ fprintf(stderr, _("%s: --search-path argument is to long\n"), PROGNAME);
-+ return 1;
-+ }
-+
-@@ -1036 +942 @@
--
-+
-@@ -1071,0 +978,2 @@
-+ if (nontp)
-+ o->flags |= OVERRIDE_FLAG_NONTP;
-@@ -1076,0 +985 @@
-+ OVERRIDE_FLAG_NONTP |
-@@ -1078,2 +987,7 @@
-- if (noresolvconf)
-- o->flags |= OVERRIDE_FLAG_NORESOLVCONF;
-+ if (keepUp)
-+ o->flags |= OVERRIDE_FLAG_KEEPUP;
-+ o->routeMetric = routeMetric;
-+ if (etcDir)
-+ strcpy(o->etcDir, etcDir);
-+ if (searchPath)
-+ strcpy(o->searchPath, searchPath);
-diff -U 0 pump-0.8.21/pump.h pump-0.8.21-r7/pump.h
---- pump-0.8.21/pump.h 2005-07-15 17:14:04.000000000 +0100
-+++ pump-0.8.21-r7/pump.h 2005-07-15 14:48:32.000000000 +0100
-@@ -57 +57,3 @@
--#define OVERRIDE_FLAG_NORESOLVCONF (1 << 5)
-+/* #define OVERRIDE_FLAG_NORESOLVCONF (1 << 5) */
-+#define OVERRIDE_FLAG_NONTP (1 << 6)
-+#define OVERRIDE_FLAG_KEEPUP (1 << 7)
-@@ -65,0 +68,2 @@
-+ char etcDir[1024];
-+ int routeMetric;
-@@ -116 +120 @@
--int pumpSetupDefaultGateway(struct in_addr * gw);
-+int pumpSetupDefaultGateway(struct pumpNetIntf * intf);
diff --git a/net-misc/pump/pump-0.8.21-r7.ebuild b/net-misc/pump/pump-0.8.21-r7.ebuild
deleted file mode 100644
index 03b264e37f10..000000000000
--- a/net-misc/pump/pump-0.8.21-r7.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2005 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-r7.ebuild,v 1.7 2005/09/24 04:34:07 vapier 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"
-
-PROVIDE="virtual/dhcpc"
-
-src_unpack() {
- cd "${WORKDIR}"
- unpack "${PN}_${PV}.orig.tar.gz"
-
- # Apply Debians pump patchset - they fix things good :)
- epatch "${DISTDIR}/${PN}_${PV}-${PATCHLEVEL}.diff.gz"
-
- # Enable the -e (--etc-dir) option to specify where to make
- # resolv.conf - default /etc
- # 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.diff"
-}
-
-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/"
-}
diff --git a/net-misc/pump/pump-0.8.21-r9.ebuild b/net-misc/pump/pump-0.8.21-r9.ebuild
deleted file mode 100644
index 92b07f638b64..000000000000
--- a/net-misc/pump/pump-0.8.21-r9.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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.2 2006/04/24 07:29:05 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"
-
-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/"
-}