[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. upstream/4.1.1-62-g82fa38e

Andrew Pollock apollock at debian.org
Wed Jun 30 05:37:00 UTC 2010


The following commit has been merged in the master branch:
commit 82fa38e88bb1ba814cab0a81567b7ee9061f38c8
Author: Andrew Pollock <apollock at debian.org>
Date:   Tue Jun 29 22:36:10 2010 -0700

    Split out the udeb dhclient-script
    
    One for Linux and one for kFreeBSD, just like in the full client package
    (for #551054)

diff --git a/debian/changelog b/debian/changelog
index 76148ba..d3840f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+isc-dhcp (4.1.1-P1-5) experimental; urgency=low
+
+  * split out the udeb dhclient-script so there's one for Linux and one for
+    kFreeBSD (closes: #551054)
+
+ -- Andrew Pollock <apollock at debian.org>  Tue, 29 Jun 2010 22:34:06 -0700
+
 isc-dhcp (4.1.1-P1-4) experimental; urgency=low
 
   * debian/rules: really enable DHCPv6 (closes: #587269)
diff --git a/debian/dhclient-script.udeb b/debian/dhclient-script.kfreebsd.udeb
similarity index 76%
copy from debian/dhclient-script.udeb
copy to debian/dhclient-script.kfreebsd.udeb
index 14f167e..522a345 100644
--- a/debian/dhclient-script.udeb
+++ b/debian/dhclient-script.kfreebsd.udeb
@@ -25,9 +25,9 @@ make_resolv_conf() {
 }
 
 set_hostname() {
-    local current_hostname=$(cat /proc/sys/kernel/hostname)
+    local current_hostname=$(hostname)
     if [ -z "$current_hostname" ] || [ "$current_hostname" = "(none)" ]; then
-        echo "$new_host_name" > /proc/sys/kernel/hostname
+        hostname "$new_host_name"
     fi
 }
 
@@ -51,7 +51,8 @@ case "$reason" in
         # Do nothing
         ;;
     PREINIT)
-	ip link set $interface up
+	ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
+	    broadcast 255.255.255.255 up
 
         # We need to give the kernel some time to get the interface up.
         sleep 1
@@ -64,24 +65,24 @@ case "$reason" in
              [ "$old_ip_address" != "$new_ip_address" ]; then
             # IP address changed. Bringing down the interface will delete all routes,
             # and clear the ARP cache.
-            ip addr del $old_ip_address$old_mask $old_broadcast_arg dev $interface
-            ip link set $interface down
+	    ifconfig $interface inet -alias $old_ip_address $medium
+	    route delete $old_ip_address 127.1 >/dev/null 2>&1
+	    ifconfig $interface inet 0 down
         fi
 
         if [ -n "$new_interface_mtu" ]; then
-            ip link set $interface mtu $new_interface_mtu || true
+	    ifconfig $interface mtu $new_interface_mtu || true
         fi
 
         if [ -z "$old_ip_address" ] || [ "$old_ip_address" != "$new_ip_address" ] || \
             [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
 
-            ip link set $interface up
-	    ip addr flush dev $interface
-            ip addr add $new_ip_address$new_mask $new_broadcast_arg dev $interface
-
-            for router in $new_routers; do
-                ip route add default via $router
-            done
+	    ifconfig $interface inet $new_ip_address $new_subnet_arg \
+	        $new_broadcast_arg $medium $mtu_arg
+	    route add $new_ip_address 127.1 $metric_arg >/dev/null 2>&1 || true
+	    for router in $new_routers; do
+	        route add default $router >/dev/null 2>&1
+	    done
         fi
 
         make_resolv_conf
@@ -97,15 +98,15 @@ case "$reason" in
 
     EXPIRE|FAIL|RELEASE|STOP)
         if [ -n "$old_ip_address" ]; then
+	    route delete $old_ip_address 127.1 >/dev/null 2>&1
             # Shut down interface, which will delete routes and clear arp cache.
-            ip addr flush dev $interface
-            ip link set $interface down
+	    ifconfig $interface inet 0 down
         fi
 
         ;;
 
     TIMEOUT)
-        ip link set $interface down
+	ifconfig $interface down
 
         ;;
 esac
diff --git a/debian/dhclient-script.udeb b/debian/dhclient-script.linux.udeb
similarity index 100%
rename from debian/dhclient-script.udeb
rename to debian/dhclient-script.linux.udeb
diff --git a/debian/rules b/debian/rules
index 782bebe..cd2838e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -99,7 +99,7 @@ install-stamp: build-stamp
 	$(INSTALL_FILE) -m 644 debian/dhclient.conf $(DESTDIR)/etc/dhcp
 
 	# udeb needs simplified dhclient script
-	$(INSTALL_FILE) -m 755 `pwd`/debian/dhclient-script.udeb \
+	$(INSTALL_FILE) -m 755 `pwd`/debian/dhclient-script.$(DEB_HOST_ARCH_OS).udeb \
 		`pwd`/debian/isc-dhcp-client-udeb/sbin/dhclient-script
 
 	# Weird, weird Japanese manpages in weird, weird locations

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list