Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113661 - baselayout-1.12.0_pre11-r1 multiple routes problem
Summary: baselayout-1.12.0_pre11-r1 multiple routes problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-26 13:45 UTC by petre rodan (RETIRED)
Modified: 2005-11-28 03:57 UTC (History)
0 users

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


Attachments
verbose start (start_verbose,1.26 KB, text/plain)
2005-11-28 03:18 UTC, petre rodan (RETIRED)
Details
Fixed the issue (functions.patch,400 bytes, patch)
2005-11-28 03:38 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description petre rodan (RETIRED) gentoo-dev 2005-11-26 13:45:16 UTC
if I define multiple routes for my wireless configurations, like
routes_tehnosistem=( "default via 10.0.1.1" "10.0.0.0/24 via 10.0.1.1" )
it will break on baselayout-1.12.0_pre11.

the problem lies in /lib/rcscripts/net.modules.d/helpers.d/functions.

using 1.12.0_pre11-r1:
 * Starting wlan0
 *   Running preup function                                                    
               [ ok ]
 *   Configuring wireless network for wlan0
 *     wlan0 connected to "tehnosistem" at 00:02:6F:34:E3:B1
 *     in managed mode on channel 11 (WEP disabled)
 *   Bringing up wlan0
 *     10.0.1.4/24                                                             
               [ ok ]
 *   Adding routes
 *     default via 10.0.1.1 10.0.0.0/24 via 10.0.1.1 ...
Error: either "to" is duplicate, or "10.0.0.0/24" is a garbage.                
               [ !! ]
 *   Running postup function

using 1.12.0_pre10 it works well:
 * Starting wlan0
 *   Running preup function                                                    
               [ ok ]
 *   Configuring wireless network for wlan0
 *     wlan0 connected to "tehnosistem" at 00:02:6F:34:E3:B1
 *     in managed mode on channel 11 (WEP disabled)
 *   Bringing up wlan0
 *     10.0.1.4/24                                                             
               [ ok ]
 *   Adding routes
 *     default via 10.0.1.1 ...                                                
               [ ok ]
 *     10.0.0.0/24 via 10.0.1.1 ...                                            
               [ ok ]
 *   Running postup function
Comment 1 Roy Marples (RETIRED) gentoo-dev 2005-11-28 01:52:52 UTC
Could you add RC_VERBOSE="yes" to /etc/conf.d/rc and attach the full output of
it starting and failing please. Also, could you attach your full /etc/conf.d/net
as I cannot reproduce the error with your config.

Thanks
Comment 2 petre rodan (RETIRED) gentoo-dev 2005-11-28 03:18:22 UTC
hi,

if I install pre11 and change the following 3 lines from functions, it works as
it should. those lines were changed between pre10 (that works) and pre11 (that
breaks)

my system uses stable keywording per default, but I do have a quite long
package.keywords file. both bash and baselayout are ~x86.

--- pre11/lib/rcscripts/net.modules.d/helpers.d/functions       2005-11-26
21:18:00.000000000 +0200
+++ pre10/lib/rcscripts/net.modules.d/helpers.d/functions       2005-11-26
22:02:39.000000000 +0200
@@ -566,9 +568,9 @@
                is_function ${mod}_variables || continue
                for v in $(${mod}_variables) ; do
                        x=""
-                       [[ -n ${option2} ]] && x="${v}_${option2}[@]"
-                       [[ -z ${!x} ]] && x="${v}_${option1}[@]"
-                       [[ -n ${!x} ]] && eval "${v}_${ifvar}=( \"${!x}\" )"
+                       [[ -n ${option2} ]] && eval x=(
\"\$\{${v}_${option2}\[@\]\}\" )
+                       [[ -z ${x} ]] && eval x=( \"\$\{${v}_${option1}\[@\]\}\" )
+                       [[ -n ${x} ]] && eval "${v}_${ifvar}=( "\"\$\{x\[@\]\}\"" )"
                done
        done

if you still need my conf.d/net, please say so and I will send it by mail to
your private inbox.

thanks
Comment 3 petre rodan (RETIRED) gentoo-dev 2005-11-28 03:18:53 UTC
Created attachment 73712 [details]
verbose start
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-11-28 03:38:48 UTC
Created attachment 73714 [details, diff]
Fixed the issue

Please test the above patch
Comment 5 petre rodan (RETIRED) gentoo-dev 2005-11-28 03:57:28 UTC
works like a charm

thanks