[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.2.2.dfsg.1-5-6-gef3326e

Andrew Pollock apollock at debian.org
Sun Jun 10 21:17:48 UTC 2012


The following commit has been merged in the master branch:
commit ef3326e44271a7aa2b759b49e14a0f06f10fc69c
Author: Andrew Pollock <apollock at debian.org>
Date:   Sun Jun 10 14:16:54 2012 -0700

    Conditionalise the chown/chmod of the new resolv.conf
    
    Prevent some noise on stderr when /etc/resolv.conf doesn't exist yet
    
    Bug: #595400

diff --git a/debian/changelog b/debian/changelog
index 71f1a80..ceaffa0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ isc-dhcp (4.2.4-1) UNRELEASED; urgency=low
   * debian/rules: do a clean between the LDAP-enabled build and the
     non-LDAP-enabled one, so that no LDAP-related artefacts are accidently
     incorporated into the non-LDAP build
+  * debian/dhclient-script.*: conditionalise the chown/chmod of the new
+    resolv.conf on the existence of the old one (closes: #595400)
 
  -- Andrew Pollock <apollock at debian.org>  Sat, 09 Jun 2012 14:01:05 -0700
 
diff --git a/debian/dhclient-script.kfreebsd b/debian/dhclient-script.kfreebsd
index 7ef24ab..b74bb35 100644
--- a/debian/dhclient-script.kfreebsd
+++ b/debian/dhclient-script.kfreebsd
@@ -34,8 +34,10 @@ make_resolv_conf() {
             sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
         fi
 
-        chown --reference=/etc/resolv.conf $new_resolv_conf
-        chmod --reference=/etc/resolv.conf $new_resolv_conf
+	if [ -f /etc/resolv.conf ]; then
+	    chown --reference=/etc/resolv.conf $new_resolv_conf
+            chmod --reference=/etc/resolv.conf $new_resolv_conf
+	fi
         mv -f $new_resolv_conf /etc/resolv.conf
     fi
 }
diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index 292bf34..decd825 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -52,8 +52,10 @@ make_resolv_conf() {
             sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
         fi
 
-        chown --reference=/etc/resolv.conf $new_resolv_conf
-        chmod --reference=/etc/resolv.conf $new_resolv_conf
+	if [ -f /etc/resolv.conf ]; then
+	    chown --reference=/etc/resolv.conf $new_resolv_conf
+	    chmod --reference=/etc/resolv.conf $new_resolv_conf
+	fi
         mv -f $new_resolv_conf /etc/resolv.conf
     # DHCPv6
     elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
@@ -77,8 +79,10 @@ make_resolv_conf() {
             sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
         fi
 
-        chown --reference=/etc/resolv.conf $new_resolv_conf
-        chmod --reference=/etc/resolv.conf $new_resolv_conf
+	if [ -f /etc/resolv.conf ]; then
+            chown --reference=/etc/resolv.conf $new_resolv_conf
+            chmod --reference=/etc/resolv.conf $new_resolv_conf
+	fi
         mv -f $new_resolv_conf /etc/resolv.conf
     fi
 }

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list