|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] network-bridge script and the ip route list command
Heia,
I'm running xen 3.0.3 on a slack 11 box myself too and had the same problem.
I noticed that the output of the ip command was indeed different from a
box my girlfriend had running with opensuse on it. (obviously it worked
for her).
I change the command to get the vifnum into this:
vifnum=${vifnum:-$(ip route list | awk '/^default / { print $5 }' | sed
's/^[^0-9]*//')}
I ran into another problem in that script however, so maybe this will save
you the same issue:
The script tries to save the default gateway and restore it later, but
because of different output a test fails.
($gateway becomes more than just 1 word in slackware.)
I changed this line:
---
[ ${gateway} ] && ip route add default via ${gateway}
---
into:
---
[ ! -z "${gateway}" ] && ip route add default via ${gateway}
---
Hope it helps :)
Wouter.
Op Do, 28 december, 2006 08:54, schreef pete hilton:
> Hi there,
> I have got xen 3.0.3 (built from source download from
> xensource) running on my linux box (Slackware 11 distribution).
>
> When the network-bridge script runs, it first of all issues "ip route
> list"
> and then parses the "default" line to pick up the last word.
>
> The ip command in my distribution gives the following:-
>
> default via 192.168.1.1 dev eth0 metric 1
>
> which naturally results in a vifnum of 1 instead of 0.
>
> Is this a bug in the script or is my "ip" command different from the norm?
>
> cheers
> pete
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-users] network-bridge script and the ip route list command,
Wouter de Geus <=
|
|
|
|
|