|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Make network-bridge fail on NFS or iscsi
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1183324846 -3600
# Node ID ccf240f99263465115f5b02e2cbcf585e852d145
# Parent a3a0202af8a43bed9203ca260020361435b90b63
Make network-bridge fail on NFS or iscsi root.
Since setting up bridging involves bringing down the network interface,
bridging clearly isn't compatible with the likes of NFS or iSCSI root.
Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>
---
tools/examples/network-bridge | 12 ++++++++++++
1 files changed, 12 insertions(+)
diff -r a3a0202af8a4 -r ccf240f99263 tools/examples/network-bridge
--- a/tools/examples/network-bridge Sun Jul 01 22:18:04 2007 +0100
+++ b/tools/examples/network-bridge Sun Jul 01 22:20:46 2007 +0100
@@ -172,9 +172,21 @@ show_status () {
echo '============================================================'
}
+is_network_root () {
+ local rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}'
/etc/mtab)
+ local rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}'
/etc/mtab)
+
+ [[ "$rootfs" =~ "^nfs" ]] || [[ "$rootopts" =~ "_netdev" ]] && return 0 ||
return 1
+}
+
op_start () {
if [ "${bridge}" = "null" ] ; then
return
+ fi
+
+ if is_network_root ; then
+ [ -x /usr/bin/logger ] && /usr/bin/logger "network-bridge: bridging
not supported on network root; not starting"
+ return
fi
if link_exists "$pdev"; then
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Make network-bridge fail on NFS or iscsi root.,
Xen patchbot-unstable <=
|
|
|
|
|