WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Make network-bridge fail on NFS or iscsi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make network-bridge fail on NFS or iscsi root.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 01 Jul 2007 22:50:49 -0700
Delivery-date: Sun, 01 Jul 2007 22:49:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=