Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 74053

Summary: conf.d/net: dhcpcd_eth0 doesn't work with embedded quotes (version 1.11.7-r2)
Product: Gentoo Linux Reporter: Evan Buswell <evanb>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 66472    

Description Evan Buswell 2004-12-10 18:00:40 UTC
When setting dhcpcd_* to an option that would take a quoted string, the scripts do not pass the string as quoted to dhcpcd, e.g. when dhcpcd_eth0="-i \"MSFT 5.0\"" then when we run /etc/init.d/net.eth0, dhcpcd exits on an error -- it uses "MSFT" as the vendor identifier (see man dhcpcd) and "5.0" as the interface, which it can't find, of course.

Reproducible: Always
Steps to Reproduce:
see above
Actual Results:  
see above

Expected Results:  
see above

Fix: in the module dhcpcd under /lib/rcscripts/net.modules.d/
change dhcpcd ${opts} ${iface}
to eval "dhcpcd ${opts} ${iface}"
see diff below for zero ambiguity.  Note that this is probably present in other
modules / configurations as well.

--- ../dhcpcd~  2004-12-05 17:13:33.000000000 -0800
+++ dhcpcd      2004-12-10 17:38:42.397021408 -0800
@@ -131,7 +131,7 @@
                return 0
        fi
 
-       dhcpcd ${opts} ${iface}
+       eval "dhcpcd ${opts} ${iface}"
        eend $? || return 1
 
        # DHCP succeeded, show address retrieved
Comment 1 SpanKY gentoo-dev 2004-12-10 18:06:57 UTC
what if you try:
dhcpcd_eth0="-i 'MSFT 5.0'" ?
Comment 2 Roy Marples (RETIRED) gentoo-dev 2004-12-12 04:19:21 UTC
Fixed in CVS - will be in baselayout-1.12.0
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-01-05 02:54:16 UTC
Bumped to baselayout-1.11.9 as 1.12.0 may take some time ...
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-01-30 23:59:29 UTC
Fixed by baselayout-1.11.9