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] Add hotplug script to run vif-bridge up script when a ba

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add hotplug script to run vif-bridge up script when a backend vif starts up.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Aug 2005 17:30:40 +0000
Delivery-date: Thu, 25 Aug 2005 17:29:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 6ac24e39c9a44fa6866ebb9ff2e47684fab5ad54
# Parent  0610add7c3fece32848c16a57157849ab7e3ced3
Add hotplug script to run vif-bridge up script when a backend vif starts up.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 0610add7c3fe -r 6ac24e39c9a4 tools/examples/Makefile
--- a/tools/examples/Makefile   Thu Aug 25 16:27:04 2005
+++ b/tools/examples/Makefile   Thu Aug 25 17:27:31 2005
@@ -24,10 +24,14 @@
 XEN_BOOT_DIR = /usr/lib/xen/boot
 XEN_BOOT = mem-map.sxp
 
+XEN_HOTPLUG_DIR = /etc/hotplug.d/xen-backend
+XEN_HOTPLUG_SCRIPTS = backend.hotplug
+
 all: 
 build:
 
-install: all install-initd install-configs install-scripts install-boot
+install: all install-initd install-configs install-scripts install-boot \
+        install-hotplug
 
 install-initd:
        [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
@@ -60,4 +64,12 @@
            $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_BOOT_DIR); \
        done
 
+install-hotplug:
+       [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
+               $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
+       for i in $(XEN_HOTPLUG_SCRIPTS); \
+           do [ -a $(DESTDIR)$(XEN_HOTPLUG_DIR)/$$i ] || \
+           $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
+       done
+
 clean:
diff -r 0610add7c3fe -r 6ac24e39c9a4 tools/examples/backend.hotplug
--- /dev/null   Thu Aug 25 16:27:04 2005
+++ b/tools/examples/backend.hotplug    Thu Aug 25 17:27:31 2005
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+#DEVPATH=/devices/xen-backend/vif-1-0
+#ACTION=add
+
+PATH=/etc/xen/scripts:$PATH
+
+DEV=$(basename "$DEVPATH")
+case "$ACTION" in
+  add)
+    case "$DEV" in
+      vif-*)
+        vif=$(echo "$DEV" | sed 's/-\([0-9]*\)-\([0-9]*\)/\1.\2/')
+        vif-bridge up domain=unknown vif="$vif" mac=fe:ff:ff:ff:ff:ff 
bridge=xen-br0 >/dev/null 2>&1
+        ;;
+    esac
+    ;;
+  remove)
+    ;;
+esac
+

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add hotplug script to run vif-bridge up script when a backend vif starts up., Xen patchbot -unstable <=