Package: ifupdown Version: 0.6.7 Severity: wishlist Tags: patch The ifup and ifdown programs call the various dhcp clients with relative paths, for example, "dhclient -e -pf /var/run/..."
On my university's network, they require a Cisco-supplied Java-based program to log on to the network. This tool requires controll of the dhclient to refresh the IP address at a specific time during the login process. This tool apparently looks in the output of a ps command for the names of various supported DHCP clients, but it uses an absolute path, "/sbin/dhclient" to find the process to communicate with, and thus cannot be used with the dhclient process spawned by ifupdown at boot. By making the various dhcp clients be called with absolute paths, this problem is resolved. I don't see where it would really be a problem because the ifup program locates the dhcp client to use by doing a command like is_execable("/sbin/dhclient") so it wouldn't work with a client not in that location anyway. A simple patch is below. Thanks, --matthew --- ifupdown-0.6.7-orig/ifupdown.nw 2006-04-27 13:52:37.000000000 -0500 +++ ifupdown-0.6.7/ifupdown.nw 2006-04-27 13:53:31.000000000 -0500 @@ -3920,29 +3920,29 @@ method dhcp up [[ifconfig %iface% hw %hwaddress%]] - dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ if (execable("/sbin/dhclient3")) - dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ elsif (execable("/sbin/dhclient")) - pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \ + /sbin/pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \ elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100)) - udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \ + /sbin/udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \ [[-c %clientid%]] \ elsif (execable("/sbin/udhcpc") && mylinuxver() >= mylinux(2,2,0)) - dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %clientid%]] \ + /sbin/dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %clientid%]] \ [[-l %leasetime%]] %iface% \ elsif (execable("/sbin/dhcpcd")) down - dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ if (execable("/sbin/dhclient3")) cat /var/run/dhclient.%iface%.pid | xargs -i kill -TERM {} \ elsif (execable("/sbin/dhclient")) - pump -i %iface% -r \ + /sbin/pump -i %iface% -r \ elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100)) cat /var/run/udhcpc.%iface%.pid | xargs -i kill -TERM {} \ elsif (execable("/sbin/udhcpc")) - dhcpcd -k %iface% \ + /sbin/dhcpcd -k %iface% \ elsif (execable("/sbin/dhcpcd")) ifconfig %iface% down --- ifupdown-0.6.7-orig/inet.defn 2006-04-27 13:52:37.000000000 -0500 +++ ifupdown-0.6.7/inet.defn 2006-04-27 13:54:18.000000000 -0500 @@ -75,29 +75,29 @@ method dhcp up [[ifconfig %iface% hw %hwaddress%]] - dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ if (execable("/sbin/dhclient3")) - dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ elsif (execable("/sbin/dhclient")) - pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \ + /sbin/pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \ elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100)) - udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \ + /sbin/udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \ [[-c %clientid%]] \ elsif (execable("/sbin/udhcpc") && mylinuxver() >= mylinux(2,2,0)) - dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %clientid%]] \ + /sbin/dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %clientid%]] \ [[-l %leasetime%]] %iface% \ elsif (execable("/sbin/dhcpcd")) down - dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ + /sbin/dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \ if (execable("/sbin/dhclient3")) cat /var/run/dhclient.%iface%.pid | xargs -i kill -TERM {} \ elsif (execable("/sbin/dhclient")) - pump -i %iface% -r \ + /sbin/pump -i %iface% -r \ elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100)) cat /var/run/udhcpc.%iface%.pid | xargs -i kill -TERM {} \ elsif (execable("/sbin/udhcpc")) - dhcpcd -k %iface% \ + /sbin/dhcpcd -k %iface% \ elsif (execable("/sbin/dhcpcd")) ifconfig %iface% down -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-mrm-20060427-1 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages ifupdown depends on: ii debconf [debconf-2.0] 1.5.0 Debian configuration management sy ii libc6 2.3.6-7 GNU C Library: Shared libraries ii net-tools 1.60-17 The NET-3 networking toolkit ifupdown recommends no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]