summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2013-02-06 14:48:21 -0800
committerJames Davidson <james.davidson@vyatta.com>2013-02-06 15:40:49 -0800
commit80b635570ceb26bcbc6dda9e769961978bfe4b7e (patch)
tree098397f851304e5d568ce0b98cafda2a4ef7d156
parent7eb2f8da35022380bbf208d791a1c5c501e5a52d (diff)
downloadvyatta-cfg-system-80b635570ceb26bcbc6dda9e769961978bfe4b7e.tar.gz
vyatta-cfg-system-80b635570ceb26bcbc6dda9e769961978bfe4b7e.zip
Skip biosdevname if running in Xen
Bug 8676 biosdevname does not behave well on Xen so simply skip it when running in Xen. (cherry picked from commit dc53d09decae1cd8098ee92c7c1dab72dc80ae50)
-rwxr-xr-xscripts/vyatta_net_name3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name
index ade77623..3df23adf 100755
--- a/scripts/vyatta_net_name
+++ b/scripts/vyatta_net_name
@@ -85,6 +85,9 @@ sub biosdevname {
# biosdevname works only on ethernet devices
return $ifname unless ($ifname =~ /^eth/);
+ # Don't use biosdevname in Xen
+ return $ifname if ( -d "/proc/xen" );
+
# Let the interface name changes ordered by previous invocations of this
# script complete before we call biosdevname. If we don't, biosdevame
# may generate incorrect name.