rpms/dhcp/devel dhclient-script,1.6,1.7 dhcp.spec,1.243,1.244

David Cantrell dcantrel at fedoraproject.org
Fri Mar 6 00:57:34 UTC 2009


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28281

Modified Files:
	dhclient-script dhcp.spec 
Log Message:
* Thu Mar 05 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-10
- restorecon fixes for /etc/localtime and /etc/resolv.conf (#488470)



Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhclient-script,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dhclient-script	19 Feb 2009 03:23:10 -0000	1.6
+++ dhclient-script	6 Mar 2009 00:57:04 -0000	1.7
@@ -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
 }
 
@@ -350,6 +354,7 @@
                 save_previous /etc/localtime
                 cp -fp ${tzfile} /etc/localtime
                 touch /etc/localtime
+                fix_context /etc/localtime
             fi
         fi
     fi
@@ -475,22 +480,19 @@
                     rm -f /etc/localtime
                     mv ${SAVEDIR}/localtime.predhclient.${interface} /etc/localtime
                     touch /etc/localtime
+                    fix_context /etc/localtime
                 fi
             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
-                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
-                if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
-                    service ypbind restart >/dev/null 2>&1
+        # execute any additional client side configuration scripts we have
+        if [ -d /etc/dhcp/dhclient.d ]; then
+            for f in /etc/dhcp/dhclient.d/*.sh ; do
+                if [ -x ${f} ]; then
+                    subsystem="${f%.sh}"
+                    . ${f} "${subsystem}_restore"
                 fi
-            fi
+            done
         fi
 
         if [ -x /etc/dhclient-${interface}-down-hooks ]; then


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -r1.243 -r1.244
--- dhcp.spec	24 Feb 2009 11:39:09 -0000	1.243
+++ dhcp.spec	6 Mar 2009 00:57:04 -0000	1.244
@@ -4,7 +4,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.1.0
-Release:  9%{?dist}
+Release:  10%{?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.
@@ -419,6 +419,9 @@
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
 %changelog
+* Thu Mar 05 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-10
+- restorecon fixes for /etc/localtime and /etc/resolv.conf (#488470)
+
 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 12:4.1.0-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list