bad syntax at line 441 in /sbin/rc, this is with baselayout 1.10. There is no additional information given on the syntax error. Reproducible: Always Steps to Reproduce: 1. 2. 3.
# /etc/init.d/net.eth0 restart * Bringing eth0 down... * Releasing DHCP lease for eth0 [ ok ] * Stopping eth0 RTNETLINK answers: Invalid argument [ ok ] * Bringing eth0 up... * eth0 dhcp [ ok ] * eth0 received address 10.0.0.2 /sbin/runscript.sh: line 441: ((: 10.0.0.2: syntax error in expression (error token is ".0.0.2")
Forgot to include this, I'm using the new-style ifconfig for dhcp with these settings. # To use DHCP on eth0, simply uncomment the following line: ifconfig_eth0=( "dhcp" ) # For passing custom options to dhcpcd use something like the following. This # example reduces the timeout for retrieving an address from 60 seconds (the # default) to 10 seconds. Note that this might be too short for some servers, # so the default is encouraged unless you know what you're doing. dhcpcd_eth0="-t 10 -h manuel"
I get the same thing, Even when I only have this line in my config: ifconfig_eth0=( "dhcp" ) /sbin/runscript.sh contains this: ... 439 for arg in $* 440 do > 441 case "${arg}" in 442 --quiet) 443 RC_QUIET_STDOUT="yes" 444 ;; 445 # We check this in functions.sh ... 446 # --nocolor) 447 # RC_NOCOLOR="yes" 448 # ;; 449 esac 450 done ...
I found the error, its at line 441 of /etc/init.d/net.eth0. Was about to report it myself; for whatever reason the author is being economical and reusing a variable (${i}), so that an IP address is used for comparison. I changed lines 462 and 463 to (if you look closely you'll see I've replaced 'i' with 'addr'): [code] addr=$(ifconfig ${1} | grep -m1 -o 'inet addr:[^ ]*' | cut -d: -f2) [[ -n ${addr} ]] && einfo " ${iface} received address ${addr}" [/code] Another case for automated tests of core scripts?
Created attachment 34343 [details, diff] Fixes dhcp problem
Created attachment 34344 [details, diff] Fixes dhcp problem Patch to net.eth0 to fix the problem. Damn silly bug to get through this
Thanks, I fixed this problem in baselayout-1.10.1: /sbin/runscript.sh: line 441: ((: 10.0.0.2: syntax error in expression (error token is ".0.0.2") However I have not yet fixed this one because I hadn't seen this bug report yet: * Stopping eth0 RTNETLINK answers: Invalid argument [ ok ] I'll get that fixed too
However I have not yet fixed this one because I hadn't seen this bug report yet: * Stopping eth0 RTNETLINK answers: Invalid argument [ ok ] I have yet to see this error any where, due you think someone may not have updated there configs properly :)
Jory, you probably just don't have iproute2 installed, which would be necessary to repeat that symptom. Spyderous, why did you add yourself to this bug? It's essentially fixed already. The only remaining problem is cosmetic.
Because my startup isn't pretty yet. =)
believe all this is fixed in baselayout-1.11.x feel free to re-open if you see the RTNETLINK problem