|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Add hotplug script to run vif-bridge up script when a ba
# 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 <=
|
|
|
|
|