[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.0-1-30-g5befac9

Andrew Pollock apollock at debian.org
Mon Aug 31 01:25:05 UTC 2009


The following commit has been merged in the master branch:
commit cf426afa304749dbfe2636d2969802f3654df891
Author: Andrew Pollock <apollock at debian.org>
Date:   Sun Aug 30 18:00:12 2009 -0700

    Also transfer the leases file when upgrading from dhcp3-server

diff --git a/debian/changelog b/debian/changelog
index 107f454..0796fe8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,7 +10,7 @@ isc-dhcp (4.1.0-1) unstable; urgency=low
   * add transitional packages
   * add debian/README.source
   * debian/control: bumped Standards-Version
-  * debian/isc-dhcp-server.postinst: transfer existing config file when upgrading from dhcp3-server
+  * debian/isc-dhcp-server.postinst: transfer existing config and lease files when upgrading from dhcp3-server
 
  -- Andrew Pollock <apollock at debian.org>  Sun, 30 Aug 2009 16:58:49 -0700
 
diff --git a/debian/isc-dhcp-server.postinst b/debian/isc-dhcp-server.postinst
index e46df20..26a19dc 100644
--- a/debian/isc-dhcp-server.postinst
+++ b/debian/isc-dhcp-server.postinst
@@ -69,9 +69,15 @@ if [ ! -e /var/lib/dhcp/dhcpd.leases ]; then
     fi
 fi
 
-# If we're upgrading from dhcp3, copy /etc/dhcp3/dhcpd.conf to /etc/dhcp
-if [ -z "$2" ] && [ -f /etc/dhcp3/dhcpd.conf ]; then
-	cp /etc/dhcp3/dhcpd.conf /etc/dhcp/dhcpd.conf
+# If we're upgrading from dhcp3, copy the config and leases over to the new
+# locations
+if [ -z "$2" ] 
+	if [ -f /etc/dhcp3/dhcpd.conf ]; then
+		cp /etc/dhcp3/dhcpd.conf /etc/dhcp/dhcpd.conf
+	if
+	if [ -f /var/lib/dhcp3/dhcpd.leases ]; then
+		cp /var/lib/dhcp3/dhcpd.leases
+	fi
 fi
 
 [ -x /sbin/restorecon ] && restorecon /var/lib/dhcp/dhcpd.leases

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list