rpms/dhcp/F-10 dhclient-script, 1.5, 1.6 dhcp.spec, 1.230, 1.231 dhcpd.init, 1.26, 1.27 dhcrelay.init, 1.9, 1.10

David Cantrell dcantrel at fedoraproject.org
Fri Apr 17 21:10:38 UTC 2009


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9908

Modified Files:
	dhclient-script dhcp.spec dhcpd.init dhcrelay.init 
Log Message:
* Thu Apr 16 2009 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-34
- Fix setting default route when client IP address changes (#486512, #473658)
- Restore SELinux context on /etc/ntp.conf and /etc/yp.conf (#483747)
- 'reload' and 'try-restart' on dhcpd and dhcrelay init scripts
  will display usage information and return code 3



Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhclient-script,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dhclient-script	4 Dec 2008 03:39:46 -0000	1.5
+++ dhclient-script	17 Apr 2009 21:10:07 -0000	1.6
@@ -3,7 +3,7 @@
 # dhclient-script: Network interface configuration script run by
 #                  dhclient based on DHCP client communication
 #
-# Copyright (C) 2008 Red Hat, Inc.
+# Copyright (C) 2008, 2009  Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,6 +40,12 @@
     logger -p ${LOGFACILITY}.${LOGLEVEL} -t "NET" "dhclient: ${msg}"
 }
 
+fix_context() {
+    if [ -x /sbin/restorecon ]; then
+        /sbin/restorecon ${1} >/dev/null 2>&1
+    fi
+}
+
 save_previous() {
     origfile="${1}"
     savefile="${SAVEDIR}/${origfile##*/}.predhclient.${interface}"
@@ -54,7 +60,7 @@
         echo > ${savefile}
     fi
 
-    restorecon ${savefile} >/dev/null 2>&1
+    fix_context ${savefile}
 }
 
 make_resolv_conf() {
@@ -94,9 +100,7 @@
         change_resolv_conf ${rscf}
         rm -f ${rscf}
 
-        if [ -x /sbin/restorecon ]; then
-            /sbin/restorecon /etc/resolv.conf >/dev/null 2>&1
-        fi
+        fix_context /etc/resolv.conf
     fi
 }
 
@@ -227,6 +231,7 @@
        [ ! "${old_routers}" = "${new_routers}" ] ||
        [ ! "${old_interface_mtu}" = "${new_interface_mtu}" ]; then
         ip -family inet addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface}
+        ip -family inet link set dev ${interface} up
 
         if [ -n "${new_interface_mtu}" ]; then
             ip link set ${interface} mtu ${new_interface_mtu}
@@ -400,7 +405,7 @@
        [ -n "${new_ntp_servers}" ] && [ -e /etc/ntp.conf ]; then
         save_previous /etc/ntp.conf
         egrep -v '^server .*  # added by /sbin/dhclient-script$'< ${SAVEDIR}/ntp.conf.predhclient.${interface} > /etc/ntp.conf
-        restorecon /etc/ntp.conf >/dev/null 2>&1
+        fix_context /etc/ntp.conf
 
         for s in ${new_ntp_servers} ; do
             echo "server ${s}  # added by /sbin/dhclient-script" >> /etc/ntp.conf
@@ -523,18 +528,21 @@
                     rm -f /etc/localtime
                     mv ${SAVEDIR}/localtime.predhclient.${interface} /etc/localtime
                     touch /etc/localtime
+                    fix_context /etc/localtime
                 fi
             fi
 
             if [ -f ${SAVEDIR}/ntp.conf.predhclient.${interface} ]; then
                 rm -f /etc/ntp.conf
-                mv -f ${SAVEDIR}/ntp.conf.predhclient.${interface} /etc/ntp.conf
+                mv ${SAVEDIR}/ntp.conf.predhclient.${interface} /etc/ntp.conf
+                fix_context /etc/ntp.conf
                 service ntpd condrestart >/dev/null 2>&1
             fi
 
             if [ -f ${SAVEDIR}/yp.conf.predhclient.${interface} ]; then
                 rm -f /etc/yp.conf
-                mv -f ${SAVEDIR}/yp.conf.predhclient.${interface} /etc/yp.conf
+                mv ${SAVEDIR}/yp.conf.predhclient.${interface} /etc/yp.conf
+                fix_context /etc/yp.conf
                 if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
                     service ypbind restart >/dev/null 2>&1
                 fi


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhcp.spec,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -r1.230 -r1.231
--- dhcp.spec	4 Dec 2008 03:39:46 -0000	1.230
+++ dhcp.spec	17 Apr 2009 21:10:07 -0000	1.231
@@ -4,7 +4,7 @@
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Name:     dhcp
 Version:  4.0.0
-Release:  33%{?dist}
+Release:  34%{?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,12 @@
 %{_libdir}/libdhcp4client.so
 
 %changelog
+* Thu Apr 16 2009 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-34
+- Fix setting default route when client IP address changes (#486512, #473658)
+- Restore SELinux context on /etc/ntp.conf and /etc/yp.conf (#483747)
+- 'reload' and 'try-restart' on dhcpd and dhcrelay init scripts
+  will display usage information and return code 3
+
 * Wed Dec 03 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-33
 - Do not calculate a prefix for an address we did not receive (#473885)
 


Index: dhcpd.init
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhcpd.init,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- dhcpd.init	21 Jun 2008 20:14:17 -0000	1.26
+++ dhcpd.init	17 Apr 2009 21:10:07 -0000	1.27
@@ -121,9 +121,6 @@
         stop ; start
         RETVAL=$?
         ;;
-    try-restart|reload)
-        RETVAL=3
-        ;;
     condrestart)
         if [ -f $lockfile ]; then
             stop ; start


Index: dhcrelay.init
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhcrelay.init,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dhcrelay.init	11 Jan 2008 00:14:20 -0000	1.9
+++ dhcrelay.init	17 Apr 2009 21:10:07 -0000	1.10
@@ -99,9 +99,6 @@
         stop && start
         RETVAL=$?
         ;;
-    try-restart|reload)
-        RETVAL=3
-        ;;
     condrestart)
         if [ -f $lockfile ]; then
             stop && start




More information about the fedora-extras-commits mailing list