[CUWiN-Dev] dhcpselect error

Bill Comisky bcomisky at pobox.com
Sat Jul 23 11:25:55 CDT 2005


I'm not sure when this broke, but we've found that on new builds that 
dhcpd isn't starting for standalone nodes.  After checking the dhcpselect 
debug log (see attached) and code, the problem was in the 
pack-master-iface() function when not providing the 3rd argument (wedge 
setting).

The attached patch fixed things here.  I also removed the DHCPSELECT_DEBUG 
definition so it could be set in the environment.

bill

--
Bill Comisky
bcomisky at pobox.com
-------------- next part --------------
Jun 30 15:45:48 cuw dhcpselect[19767]: start
Jun 30 15:45:48 cuw dhcpselect[19767]: debugging on
Jun 30 15:45:48 cuw dhcpselect[19767]: Installing signal handlers.
Jun 30 15:45:48 cuw dhcpselect[19767]: Entering main loop.
Jun 30 15:45:49 cuw dhcpselect[19767]: main: loop
Jun 30 15:45:49 cuw dhcpselect[19767]: main: time: 1120146349
Jun 30 15:45:49 cuw dhcpselect[19767]: main: iteration: 0
Jun 30 15:45:49 cuw dhcpselect[19767]: main: global_dhcpd_ifaces: ''
Jun 30 15:45:49 cuw dhcpselect[19767]: main: global_dhclient_ifaces: ''
Jun 30 15:45:49 cuw dhcpselect[19767]: retrieve-active-ifaces: Retrieving active interfaces.
Jun 30 15:45:49 cuw dhcpselect[19767]: retrieve-active-ifaces: Old list of active ifaces: ''
Jun 30 15:45:50 cuw dhcpselect[19767]: retrieve-active-ifaces: Testing ath0.
Jun 30 15:45:50 cuw dhcpselect[19767]: retrieve-active-ifaces: Skipping wireless interface ath0.
Jun 30 15:45:50 cuw dhcpselect[19767]: retrieve-active-ifaces: Testing sip0.
Jun 30 15:45:50 cuw dhcpselect[19767]: retrieve-active-ifaces: Skipping inactive interface sip0.
Jun 30 15:45:51 cuw dhcpselect[19767]: retrieve-active-ifaces: Testing sip1.
Jun 30 15:45:51 cuw dhcpselect[19767]: retrieve-active-ifaces: sip1 is eligible for dhcpd/dhclient.
Jun 30 15:45:51 cuw dhcpselect[19767]: is-dhcpd-iface: Checking whether sip1 is a dhcpd interface.
Jun 30 15:45:51 cuw dhcpselect[19767]: is-dhclient-iface: Checking whether sip1 is a dhclient interface.
Jun 30 15:45:51 cuw dhcpselect[19767]: retrieve-active-ifaces: sip1: neither dhcpd/dhclient.
Jun 30 15:45:51 cuw dhcpselect[19767]: retrieve-active-ifaces: Setting sip1 to dhclient mode.
Jun 30 15:45:51 cuw dhcpselect[19767]: Setting sip1 to dhclient.
Jun 30 15:45:52 cuw dhcpselect[19767]: switch-interface: Starting.
Jun 30 15:45:52 cuw dhcpselect[19767]: switch-interface: Old dhcpd ifaces: ''
Jun 30 15:45:52 cuw dhcpselect[19767]: switch-interface: Old dhclient ifaces: ''
Jun 30 15:45:52 cuw dhcpselect[19767]: switch-interface: iface=sip1, to_mode=dhclient
Jun 30 15:45:53 cuw dhcpselect[19767]: switch-interface: Switching sip1 to dhclient.
Jun 30 15:45:53 cuw dhcpselect[19767]: switch-interface: New list of dhcpd ifaces: ''
Jun 30 15:45:53 cuw dhcpselect[19767]: switch-interface: New list of dhclient ifaces: 'sip1'
Jun 30 15:45:53 cuw dhcpselect[19767]: switch-interface: Finished.
Jun 30 15:45:54 cuw dhcpselect[19767]: get-iface-timer: Retrieving timer value for sip1.
Jun 30 15:45:54 cuw dhcpselect[19767]: get-iface-timer: Could not find timer present, using default of 180.
Jun 30 15:45:54 cuw dhcpselect[19767]: get-iface-timer: Returning timer value of 180.
Jun 30 15:45:54 cuw dhcpselect[19767]: retrieve-active-ifaces: Got timeout value of 180.
Jun 30 15:45:54 cuw dhcpselect[19767]: pack-master-iface: iface=sip1, timer=180, wedge=nowedge
Jun 30 15:45:54 cuw dhcpselect[19767]: retrieve-active-ifaces: New list of active ifaces: 'sip1-180-nowedge'
Jun 30 15:45:55 cuw dhcpselect[19767]: check-net-connected: Checking for an Internet connection.
Jun 30 15:45:55 cuw dhcpselect[19767]: stop-dynamic-services: Stopping dynamic host services.
Jun 30 15:45:55 cuw dhcpselect[19767]: Stopping dhcpd.
Jun 30 15:45:56 cuw dhcpselect[19767]: Stopping dhclient.
Jun 30 15:45:57 cuw dhcpselect[19767]: start-dynamic-services: Starting dynamic host services.
Jun 30 15:45:57 cuw dhcpselect[19767]: create-dynamic-configuration: Updating dynamic host configuration.
Jun 30 15:45:57 cuw dhcpselect[19767]: create-dynamic-configuration: Writing dhcpd configuration.
Jun 30 15:45:57 cuw dhcpselect[19767]: create-dynamic-configuration: Writing dhclient configuration.
Jun 30 15:45:57 cuw dhcpselect[19767]: Writing dhclient config for sip1.
Jun 30 15:45:59 cuw dhcpselect[19767]: Starting dhclient.
Jun 30 15:46:14 cuw dhcpselect[19767]: No interfaces are in dhcpd mode.  Skipping dhcpd startup.
Jun 30 15:46:16 cuw dhcpselect[19767]: main: loop
Jun 30 15:46:17 cuw dhcpselect[19767]: main: time: 1120146376
Jun 30 15:46:17 cuw dhcpselect[19767]: main: iteration: 1
Jun 30 15:46:17 cuw dhcpselect[19767]: main: global_dhcpd_ifaces: ''
Jun 30 15:46:17 cuw dhcpselect[19767]: main: global_dhclient_ifaces: 'sip1'
Jun 30 15:46:17 cuw dhcpselect[19767]: parse-dhclient-value: Starting.
Jun 30 15:46:18 cuw dhcpselect[19767]: parse-dhclient-value: iface=sip1, action=failed
Jun 30 15:46:18 cuw dhcpselect[19767]: parse-dhclient-value: Received 'failed' from dhclient for iface sip1.
Jun 30 15:46:18 cuw dhcpselect[19767]: dhclient: sip1 failed to bind!
Jun 30 15:46:18 cuw dhcpselect[19767]: get-iface-wedge: Retrieving wedge value for sip1.
Jun 30 15:46:18 cuw dhcpselect[19767]: get-iface-wedge: Found wedge value of nowedge.
Jun 30 15:46:19 cuw dhcpselect[19767]: get-iface-wedge: Returning wedge value of nowedge.
Jun 30 15:46:19 cuw dhcpselect[19767]: net-disconnect: Starting.
Jun 30 15:46:19 cuw dhcpselect[19767]: net-disconnect: Old list of net-connected ifaces: ''
Jun 30 15:46:19 cuw dhcpselect[19767]: net-disconnect: Removing sip1 from the list of Internet-connected interfaces.
Jun 30 15:46:19 cuw dhcpselect[19767]: net-disconnect: New list of net-connected ifaces: ''
Jun 30 15:46:19 cuw dhcpselect[19767]: net-disconnect: Finished.
Jun 30 15:46:19 cuw dhcpselect[19767]: Setting sip1 to dhcpd.
Jun 30 15:46:20 cuw dhcpselect[19767]: switch-interface: Starting.
Jun 30 15:46:20 cuw dhcpselect[19767]: switch-interface: Old dhcpd ifaces: ''
Jun 30 15:46:20 cuw dhcpselect[19767]: switch-interface: Old dhclient ifaces: 'sip1'
Jun 30 15:46:20 cuw dhcpselect[19767]: switch-interface: iface=sip1, to_mode=dhcpd
Jun 30 15:46:20 cuw dhcpselect[19767]: switch-interface: Switching sip1 to dhcpd.
Jun 30 15:46:22 cuw dhcpselect[19767]: get-iface-timer: Retrieving timer value for sip1.
Jun 30 15:46:23 cuw dhcpselect[19767]: get-iface-timer: Found timer value of 180.
Jun 30 15:46:23 cuw dhcpselect[19767]: get-iface-timer: Returning timer value of 180.
/sbin/dhcpselect: 3: parameter not set
-------------- next part --------------
Index: dhcpselect
===================================================================
--- dhcpselect	(revision 3371)
+++ dhcpselect	(working copy)
@@ -16,7 +16,6 @@
 LOG_VERSION="1.1"
 
 PREF_DHCLIENT_ALIAS=0
-DHCPSELECT_DEBUG=no
 
 PROGNAME=$(basename $0)
 HOSTNAME=$(hostname -s)
@@ -983,14 +982,8 @@
 {
 	local arg_iface_name=$1
 	local arg_iface_timer=$2
-	local arg_iface_wedge=$3
+	local arg_iface_wedge="${3:-nowedge}"
 
-	# If there's only two arguments, set the third argument
-	# to an obvious 'don't wedge' value.
-	if [ "x$arg_iface_wedge" = "x" ]; then
-	    arg_iface_wedge="nowedge"
-	fi
-
 	debug "pack-master-iface: iface=$arg_iface_name, timer=$arg_iface_timer, wedge=$arg_iface_wedge"
 	rv="${arg_iface_name}-${arg_iface_timer}-${arg_iface_wedge}"
 }


More information about the CU-Wireless-Dev mailing list