Package: dhcp3-client-udeb
Version: 3.1.3-1
Severity: normal
Tags: patch

Similarly to what is done for the main build, the udeb build needs a 
different configuration file for GNU/kFreeBSD. Please find a patch below
for that.

diff -u dhcp3-3.1.3/debian/rules dhcp3-3.1.3/debian/rules
--- dhcp3-3.1.3/debian/rules
+++ dhcp3-3.1.3/debian/rules
@@ -120,7 +120,7 @@
                `pwd`/debian/dhcp3-client-udeb/sbin/
 
        # 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/dhcp3-client-udeb/sbin/dhclient-script
 
        # Rename binaries so they do not conflict with the binaries in the
reverted:
--- dhcp3-3.1.3/debian/dhclient-script.udeb
+++ dhcp3-3.1.3.orig/debian/dhclient-script.udeb
@@ -1,113 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# reduced dhclient-script for the Debian installer
-# changes by Joshua Kwan <[email protected]>,
-# Bastian Blank <[email protected]>
-
-# dhclient-script for Linux. Dan Halbert, March, 1997.
-# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
-# Modified for Debian.  Matt Zimmerman and Eloy Paris, December 2003
-
-make_resolv_conf() {
-    if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
-        local new_resolv_conf=/etc/resolv.conf.dhclient-new
-        rm -f $new_resolv_conf
-        if [ -n "$new_domain_name" ]; then
-            echo "search $new_domain_name" >>$new_resolv_conf
-        fi
-        for nameserver in $new_domain_name_servers; do
-            echo "nameserver $nameserver" >>$new_resolv_conf
-        done
-        mv $new_resolv_conf /etc/resolv.conf
-    fi
-}
-
-set_hostname() {
-    local current_hostname=$(cat /proc/sys/kernel/hostname)
-    if [ -z "$current_hostname" ] || [ "$current_hostname" = "(none)" ]; then
-        echo "$new_host_name" > /proc/sys/kernel/hostname
-    fi
-}
-
-if [ -n "$new_subnet_mask" ]; then
-    new_mask="/$(ptom $new_subnet_mask)"
-fi
-if [ -n "$old_subnet_mask" ]; then
-    old_mask="/$(ptom $old_subnet_mask)"
-fi
-
-if [ -n "$new_broadcast_address" ]; then
-    new_broadcast_arg="broadcast $new_broadcast_address"
-fi
-if [ -n "$old_broadcast_address" ]; then
-    old_broadcast_arg="broadcast $old_broadcast_address"
-fi
-    
-# Execute the operation
-case "$reason" in
-    MEDIUM|ARPCHECK|ARPSEND)
-        # Do nothing
-        ;;
-    PREINIT)
-       ip link set $interface up
-
-        # We need to give the kernel some time to get the interface up.
-        sleep 1
-        ;;
-    BOUND|RENEW|REBIND|REBOOT)
-
-        set_hostname
-        
-        if [ -n "$old_ip_address" ] && \
-             [ "$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
-        fi
-
-        if [ -n "$new_interface_mtu" ]; then
-            ip link set $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
-        fi
-
-        make_resolv_conf
-
-        # Get the domain name into a file suitable for netcfg to read.
-        printf "$new_domain_name" > /tmp/domain_name
-
-        if [ -n "$new_ntp_servers" ]; then
-            printf "$new_ntp_servers" > /tmp/dhcp-ntp-servers
-        fi
-
-        ;;
-
-    EXPIRE|FAIL|RELEASE|STOP)
-        if [ -n "$old_ip_address" ]; then
-            # Shut down interface, which will delete routes and clear arp 
cache.
-            ip addr flush dev $interface
-            ip link set $interface down
-        fi
-
-        ;;
-
-    TIMEOUT)
-        ip link set $interface down
-
-        ;;
-esac
-
-exit 0
diff -u dhcp3-3.1.3/debian/changelog dhcp3-3.1.3/debian/changelog
--- dhcp3-3.1.3/debian/changelog
+++ dhcp3-3.1.3/debian/changelog
@@ -1,3 +1,9 @@
+dhcp3 (3.1.3-1+kbsd) unreleased; urgency=low
+
+  * Use a different script for kfreebsd's udeb. 
+
+ -- Aurelien Jarno <[email protected]>  Wed, 14 Oct 2009 17:42:34 +0200
+
 dhcp3 (3.1.3-1) unstable; urgency=low
 
   * New upstream release
only in patch2:
unchanged:
--- dhcp3-3.1.3.orig/debian/dhclient-script.linux.udeb
+++ dhcp3-3.1.3/debian/dhclient-script.linux.udeb
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+set -e
+
+# reduced dhclient-script for the Debian installer
+# changes by Joshua Kwan <[email protected]>,
+# Bastian Blank <[email protected]>
+
+# dhclient-script for Linux. Dan Halbert, March, 1997.
+# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+# Modified for Debian.  Matt Zimmerman and Eloy Paris, December 2003
+
+make_resolv_conf() {
+    if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
+        local new_resolv_conf=/etc/resolv.conf.dhclient-new
+        rm -f $new_resolv_conf
+        if [ -n "$new_domain_name" ]; then
+            echo "search $new_domain_name" >>$new_resolv_conf
+        fi
+        for nameserver in $new_domain_name_servers; do
+            echo "nameserver $nameserver" >>$new_resolv_conf
+        done
+        mv $new_resolv_conf /etc/resolv.conf
+    fi
+}
+
+set_hostname() {
+    local current_hostname=$(cat /proc/sys/kernel/hostname)
+    if [ -z "$current_hostname" ] || [ "$current_hostname" = "(none)" ]; then
+        echo "$new_host_name" > /proc/sys/kernel/hostname
+    fi
+}
+
+if [ -n "$new_subnet_mask" ]; then
+    new_mask="/$(ptom $new_subnet_mask)"
+fi
+if [ -n "$old_subnet_mask" ]; then
+    old_mask="/$(ptom $old_subnet_mask)"
+fi
+
+if [ -n "$new_broadcast_address" ]; then
+    new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+if [ -n "$old_broadcast_address" ]; then
+    old_broadcast_arg="broadcast $old_broadcast_address"
+fi
+    
+# Execute the operation
+case "$reason" in
+    MEDIUM|ARPCHECK|ARPSEND)
+        # Do nothing
+        ;;
+    PREINIT)
+       ip link set $interface up
+
+        # We need to give the kernel some time to get the interface up.
+        sleep 1
+        ;;
+    BOUND|RENEW|REBIND|REBOOT)
+
+        set_hostname
+        
+        if [ -n "$old_ip_address" ] && \
+             [ "$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
+        fi
+
+        if [ -n "$new_interface_mtu" ]; then
+            ip link set $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
+        fi
+
+        make_resolv_conf
+
+        # Get the domain name into a file suitable for netcfg to read.
+        printf "$new_domain_name" > /tmp/domain_name
+
+        if [ -n "$new_ntp_servers" ]; then
+            printf "$new_ntp_servers" > /tmp/dhcp-ntp-servers
+        fi
+
+        ;;
+
+    EXPIRE|FAIL|RELEASE|STOP)
+        if [ -n "$old_ip_address" ]; then
+            # Shut down interface, which will delete routes and clear arp 
cache.
+            ip addr flush dev $interface
+            ip link set $interface down
+        fi
+
+        ;;
+
+    TIMEOUT)
+        ip link set $interface down
+
+        ;;
+esac
+
+exit 0
only in patch2:
unchanged:
--- dhcp3-3.1.3.orig/debian/dhclient-script.kfreebsd.udeb
+++ dhcp3-3.1.3/debian/dhclient-script.kfreebsd.udeb
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+set -e
+
+# reduced dhclient-script for the Debian installer
+# changes by Joshua Kwan <[email protected]>,
+# Bastian Blank <[email protected]>
+
+# dhclient-script for Linux. Dan Halbert, March, 1997.
+# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+# Modified for Debian.  Matt Zimmerman and Eloy Paris, December 2003
+
+make_resolv_conf() {
+    if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
+        local new_resolv_conf=/etc/resolv.conf.dhclient-new
+        rm -f $new_resolv_conf
+        if [ -n "$new_domain_name" ]; then
+            echo "search $new_domain_name" >>$new_resolv_conf
+        fi
+        for nameserver in $new_domain_name_servers; do
+            echo "nameserver $nameserver" >>$new_resolv_conf
+        done
+        mv $new_resolv_conf /etc/resolv.conf
+    fi
+}
+
+set_hostname() {
+    local current_hostname=$(hostname)
+    if [ -z "$current_hostname" ] || [ "$current_hostname" = "(none)" ]; then
+        hostname "$new_host_name"
+    fi
+}
+
+if [ -n "$new_subnet_mask" ]; then
+    new_mask="/$(ptom $new_subnet_mask)"
+fi
+if [ -n "$old_subnet_mask" ]; then
+    old_mask="/$(ptom $old_subnet_mask)"
+fi
+
+if [ -n "$new_broadcast_address" ]; then
+    new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+if [ -n "$old_broadcast_address" ]; then
+    old_broadcast_arg="broadcast $old_broadcast_address"
+fi
+    
+# Execute the operation
+case "$reason" in
+    MEDIUM|ARPCHECK|ARPSEND)
+        # Do nothing
+        ;;
+    PREINIT)
+       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
+        ;;
+    BOUND|RENEW|REBIND|REBOOT)
+
+        set_hostname
+        
+        if [ -n "$old_ip_address" ] && \
+             [ "$old_ip_address" != "$new_ip_address" ]; then
+            # IP address changed. Bringing down the interface will delete all 
routes,
+            # and clear the ARP cache.
+           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
+           ifconfig $interface mtu $new_interface_mtu || true
+        fi
+
+        if [ -z "$old_ip_address" ] || [ "$old_ip_address" != 
"$new_ip_address" ] || \
+            [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
+
+           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
+
+        # Get the domain name into a file suitable for netcfg to read.
+        printf "$new_domain_name" > /tmp/domain_name
+
+        if [ -n "$new_ntp_servers" ]; then
+            printf "$new_ntp_servers" > /tmp/dhcp-ntp-servers
+        fi
+
+        ;;
+
+    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.
+           ifconfig $interface inet 0 down
+        fi
+
+        ;;
+
+    TIMEOUT)
+       ifconfig $interface down
+
+        ;;
+esac
+
+exit 0


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.2-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to