From e75c58ed16af7ce18204358b91cc857de4e78ca6 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 27 Oct 2007 16:55:25 -0400 Subject: [PATCH] don't reboot machine when create a running VM. svn path=/trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/; revision=212 --- debian/changelog | 7 +++++++ files/usr/sbin/sipb-xen-vmcontrol | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 290807d..a536018 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +sipb-xen-remctl-auto (1.0.6) unstable; urgency=low + + * get rid of old "vmboot" call + * make "create" not destroy running machines. + + -- Tim Abbott Sat, 27 Oct 2007 16:54:26 -0400 + sipb-xen-remctl-auto (1.0.5) unstable; urgency=low * move to common /usr/sbin/sipb-xen-* naming diff --git a/files/usr/sbin/sipb-xen-vmcontrol b/files/usr/sbin/sipb-xen-vmcontrol index bf72dbc..dbe3c36 100755 --- a/files/usr/sbin/sipb-xen-vmcontrol +++ b/files/usr/sbin/sipb-xen-vmcontrol @@ -17,8 +17,12 @@ case "$ACTION" in list|vcpu-list|destroy|uptime|shutdown) xm "$ACTION" "$MACHINE" ;; - reboot|create|vmboot) - xm destroy "$MACHINE" 2>/dev/null + create|reboot) + if [ "$ACTION" = "reboot" ]; then + xm destroy "$MACHINE" 2>/dev/null + else + xm list "$MACHINE" >/dev/null 2>/dev/null && echo "$MACHINE already exists" && exit 1 + fi if [ -n "$3" ]; then xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$3" else -- 1.7.9.5