From b5f27588694ffbaf389b7f102190d34d581f82a9 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Nov 11 2008 22:10:14 +0000 Subject: - Correctly source ifcfg-DEVICE files (#470928) - Honor $keep_old_ip in dhclient-script (#471127) --- diff --git a/dhclient-script b/dhclient-script index 36ca76e..7fcbf9d 100755 --- a/dhclient-script +++ b/dhclient-script @@ -451,10 +451,10 @@ if [ -f /etc/sysconfig/networking/network ]; then fi CONFIG="${interface}" -need_config ${CONFIG} - -if [ -f "${CONFIG}" ]; then - source_config +if [ -d /etc/sysconfig/network-scripts ]; then + cd /etc/sysconfig/network-scripts + need_config ${CONFIG} + source_config >/dev/null 2>&1 fi if [ -n "${new_subnet_mask}" ]; then diff --git a/dhcp-4.0.0-inherit-leases.patch b/dhcp-4.0.0-inherit-leases.patch index 642fdea..d289924 100644 --- a/dhcp-4.0.0-inherit-leases.patch +++ b/dhcp-4.0.0-inherit-leases.patch @@ -1,6 +1,6 @@ diff -up dhcp-4.0.0/client/dhclient.c.inherit dhcp-4.0.0/client/dhclient.c ---- dhcp-4.0.0/client/dhclient.c.inherit 2008-08-01 11:34:29.000000000 -1000 -+++ dhcp-4.0.0/client/dhclient.c 2008-08-01 11:34:42.000000000 -1000 +--- dhcp-4.0.0/client/dhclient.c.inherit 2008-11-11 11:33:43.000000000 -1000 ++++ dhcp-4.0.0/client/dhclient.c 2008-11-11 11:34:27.000000000 -1000 @@ -2296,6 +2296,7 @@ void send_request (cpp) { struct client_state *client = cpp; @@ -18,11 +18,11 @@ diff -up dhcp-4.0.0/client/dhclient.c.inherit dhcp-4.0.0/client/dhclient.c + if (client -> interface -> addresses != NULL) { + for (i = 0; i < client -> interface -> address_count; i++) { + if (client -> active && -+ client -> active -> is_bootp && ++ !client -> active -> is_bootp && + client -> active -> expiry > cur_time && + client -> interface -> addresses[i].s_addr != 0 && + client -> active -> address.len == 4 && -+ memcpy (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) { ++ memcmp (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) { + client_envadd (client, "", "keep_old_ip", "%s", "yes"); + break; + } diff --git a/dhcp.spec b/dhcp.spec index 2dc27c1..3ff0b1b 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -4,7 +4,7 @@ Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent Name: dhcp Version: 4.0.0 -Release: 31%{?dist} +Release: 32%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -449,6 +449,10 @@ fi %{_libdir}/libdhcp4client.so %changelog +* Tue Nov 11 2008 David Cantrell - 12:4.0.0-32 +- Correctly source ifcfg-DEVICE files (#470928) +- Honor $keep_old_ip in dhclient-script (#471127) + * Wed Oct 29 2008 David Cantrell - 12:4.0.0-31 - Use O_CLOEXEC in open(2) calls and "e" mode in fopen(3) calls, build with -D_GNU_SOURCE so we pick up O_CLOEXEC (#468984)