X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/35d0a181fbad2e9f266cc68e55e6834700a748cf..437a816b13b6701cdafc6fb7363324bd60a7efbe:/files/usr/sbin/invirt-vmcontrol?ds=sidebyside diff --git a/files/usr/sbin/invirt-vmcontrol b/files/usr/sbin/invirt-vmcontrol index bb3006b..70bff12 100755 --- a/files/usr/sbin/invirt-vmcontrol +++ b/files/usr/sbin/invirt-vmcontrol @@ -6,8 +6,7 @@ # # $0 and $1 come from the trusted remctl source. # -# $2 and so on are user-provided, and thus sketchy. I don't think we -# need them for this script. +# $2 and so on are user-provided, and thus sketchy. ORIGMACHINE="$1" ACTION="$2" @@ -17,17 +16,13 @@ case "$ACTION" in list|vcpu-list|uptime) xm "$ACTION" "$MACHINE" ;; - destroy|shutdown) + destroy|shutdown|reboot) xm "$ACTION" "$MACHINE" /usr/sbin/invirt-update-conserver /dev/null 2>&1 & ;; - install|create|reboot) + install|create) shift; shift; - 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 + xm list "$MACHINE" >/dev/null 2>/dev/null && echo "$MACHINE already exists" && exit 1 if [ "$ACTION" = "install" ]; then xm create invirt-database machine_name="$ORIGMACHINE" installer_options="$(printf '%q ' "$@")" elif [ -n "$1" ]; then @@ -40,6 +35,9 @@ case "$ACTION" in list-long) xm list --long "$MACHINE" ;; + vnctoken) + invirt-vnc-authtoken "$ORIGMACHINE" + ;; *) echo "ERROR: Invalid Command" exit 34