Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113402 - network module arping fails in 1.12.0_pre11 with multiple gateways set
Summary: network module arping fails in 1.12.0_pre11 with multiple gateways set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-23 15:01 UTC by Ales Havlik
Modified: 2005-11-24 00:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ales Havlik 2005-11-23 15:01:56 UTC
when i set multiple gateways to probe in /etc/conf.d/net, module doesn't work.
With only one gw selected it works but fails with module ifconfig.

Reproducible: Always
Steps to Reproduce:
1. add these lines to /etc/conf.d/net
config_eth0=( "arping" )
modules=( "ifconfig" )
gateways_eth0=( "10.0.37.1" "192.168.0.1" "10.0.0.1" )
config_192168000001=( "192.168.0.2/24" )
routes_192168000001=( "default via 192.168.0.1" )
dns_servers_192168000001=( "192.168.0.1" )
modules_eth0=( "!plug" )

2. run /etc/init.d/net.eth0 start


Actual Results:  
 # /etc/init.d/net.eth0 start
 * Caching service dependencies ...                                       [ ok ]
 * Starting eth0
 *   Bringing up eth0
 *     arping
 *       Pinging gateways on eth0 for configuration                       [ !! ]

Expected Results:  
# /etc/init.d/net.eth0 start
 * Starting eth0
 *     arping.new does not support the required function depend
 *     ifconfig.new does not support the required function depend
 *   Bringing up eth0
 *     arping
 *       Pinging gateways on eth0 for configuration
 *     192.168.0.2/24                                                     [ ok ]
 *   Adding routes
 *     default via 192.168.0.1 ...                                        [ ok ]

Tried to fix it and there are my diffs for files in /lib/rcscripts/net.modules.d:

#diff -u ifconfig ifconfig.new 
--- ifconfig    2005-11-23 23:31:40.000000000 +0100
+++ ifconfig.new        2005-11-23 23:32:57.000000000 +0100
@@ -265,6 +265,7 @@
 ifconfig_post_start() {
        local iface="$1" ifvar=$( bash_variable "$1" ) routes x metric mtu cidr
        metric="metric_${ifvar}"
+       metric=${!metric}
 
        ifconfig_exists "${iface}" || return 0

#diff -u arping arping.new 
--- arping      2005-11-23 23:31:40.000000000 +0100
+++ arping.new  2005-11-23 23:27:19.000000000 +0100
@@ -68,6 +68,7 @@
                eerror "No gateways have been defined (gateways_${ifvar}=\"...\")"
                return 1
        fi
+       gateways=${gateways}[@]
 
        eindent

#diff -u helpers.d/functions helpers.d/functions.new 
--- helpers.d/functions 2005-11-23 23:31:40.000000000 +0100
+++ helpers.d/functions.new     2005-11-23 23:27:51.000000000 +0100
@@ -568,7 +568,7 @@
                        x=""
                        [[ -n ${option2} ]] && x="${v}_${option2}[@]"
                        [[ -z ${!x} ]] && x="${v}_${option1}[@]"
-                       [[ -n ${!x} ]] && eval "${v}_${ifvar}=( "${!x}" )"
+                       [[ -n ${!x} ]] && eval "${v}_${ifvar}=( \"${!x}\" )"
                done
        done
Comment 1 Roy Marples (RETIRED) gentoo-dev 2005-11-24 00:33:30 UTC
Thanks for the fix!

Fixed in 1.12.0_pre11-r1