From: David Lively <dlively@virtualiron.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] minor tweak to keep network-bridge working in busybox environment
Date: Fri, 19 May 2006 14:02:54 -0400 [thread overview]
Message-ID: <446E084E.9010603@virtualiron.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hi Folks -
The latest tweak to the network-bridge script doesn't work in a
busybox environment (because the busybox version of 'awk' is a
little too feeble). The attached patch fixes this, while keeping it
working in a more capable environment. (It also generalizes the
vifnum extraction slightly - stripping all leading non-numeric chars
from the default ifname.)
Dave
[-- Attachment #2: network-bridge-tweak.patch --]
[-- Type: text/x-patch, Size: 674 bytes --]
Make the latest network-bridge tweaks work in a busybox environment too.
Signed-off-by: David Lively <dlively@virtualiron.com>
diff -r aa17b7173325 tools/examples/network-bridge
--- a/tools/examples/network-bridge Thu May 18 21:41:56 2006 +0100
+++ b/tools/examples/network-bridge Fri May 19 14:00:34 2006 -0400
@@ -59,7 +59,7 @@ findCommand "$@"
findCommand "$@"
evalVariables "$@"
-vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/^(eth|xenbr)/,"",$NF); print $NF }')}
+vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed -r 's/[^0-9]+//')}
bridge=${bridge:-xenbr${vifnum}}
netdev=${netdev:-eth${vifnum}}
antispoof=${antispoof:-no}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-05-19 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-19 18:02 David Lively [this message]
2006-05-20 7:32 ` [PATCH] minor tweak to keep network-bridge working in busybox environment Christian Limpach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446E084E.9010603@virtualiron.com \
--to=dlively@virtualiron.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.