Changeset 196


Ignore:
Timestamp:
Oct 16, 2007, 1:05:30 AM (16 years ago)
Author:
tabbott
Message:

more updates to remctl code.

Now "reboot" on the web interface will act more like a hand reboot.
In particular, it will remove existing CDs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-vmcontrol

    r195 r196  
    11#!/bin/sh
    2 # dispatch-ACTION.sh MACHINE
     2# sipb-xen-vmcontrol MACHINE ACTION
    33#
    44# remctl should have already verified that the user is authorized to
     
    1010# need them for this script.
    1111
    12 ACTION=$(echo "$0" | awk -F'.' '{print $2}')
    1312ORIGMACHINE="$1"
     13ACTION="$2"
    1414MACHINE="d_$ORIGMACHINE"
    1515
    1616case "$ACTION" in
    17     list|vcpu-list|destroy|create|uptime|shutdown)
     17    list|vcpu-list|destroy|uptime|shutdown)
    1818        xm "$ACTION" "$MACHINE"
    1919        ;;
    20     reboot-with-cdrom)
    21         xm shutdown "$MACHINE"
    22         xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$2"
    23         ;;
    24     reboot)
    25         if [ -n "$2" ]; then
    26             /usr/sbin/dispatch.reboot-with-cdrom.sh "$ORIGMACHINE" "$2" &
     20    reboot|create|vmboot)
     21        xm destroy "$MACHINE" 2>/dev/null
     22        if [ -n "$3" ]; then
     23            xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$3"
    2724        else
    28             xm reboot "$MACHINE"
     25            xm create sipb-database machine_name="$ORIGMACHINE"
    2926        fi
    3027        ;;
Note: See TracChangeset for help on using the changeset viewer.