more web interface updates
authorTim Abbott <tabbott@mit.edu>
Mon, 8 Oct 2007 00:49:00 +0000 (20:49 -0400)
committerTim Abbott <tabbott@mit.edu>
Mon, 8 Oct 2007 00:49:00 +0000 (20:49 -0400)
svn path=/trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/; revision=127

files/usr/sbin/dispatch.reboot-with-cdrom.sh [new symlink]
files/usr/sbin/dispatch.sh

diff --git a/files/usr/sbin/dispatch.reboot-with-cdrom.sh b/files/usr/sbin/dispatch.reboot-with-cdrom.sh
new file mode 120000 (symlink)
index 0000000..29a39d7
--- /dev/null
@@ -0,0 +1 @@
+dispatch.sh
\ No newline at end of file
index 31723a3..00576dd 100755 (executable)
 
 ACTION=$(echo "$0" | awk -F'.' '{print $2}')
 MACHINE="$1"
 
 ACTION=$(echo "$0" | awk -F'.' '{print $2}')
 MACHINE="$1"
-echo "$ACTION"
+#echo "$0" "$ACTION"
 
 case "$ACTION" in
 
 case "$ACTION" in
-    reboot|list|vcpu-list|destroy|create|uptime)
+    list|vcpu-list|destroy|create|uptime)
         xm "$ACTION" "$MACHINE"
         exit 0
        ;;
         xm "$ACTION" "$MACHINE"
         exit 0
        ;;
+    reboot-with-cdrom)
+       xm shutdown "$MACHINE"
+       xm create sipb-database machine_name="$MACHINE" cdrom_image="$2"
+       ;;
+    reboot)
+       if [ -n "$2" ]; then
+           /usr/sbin/dispatch.reboot-with-cdrom.sh "$1" "$2" &
+       else
+           xm reboot "$MACHINE"
+       fi
+       ;;
     list-long)
        xm list --long "$MACHINE"
        ;;
     list-long)
        xm list --long "$MACHINE"
        ;;