source: trunk/packages/invirt-remote/host/usr/sbin/invirt-remote

Last change on this file was 2289, checked in by broder, 15 years ago

In invirt-remote:

  • availability takes way too long to type.
  • Property svn:executable set to *
File size: 931 bytes
RevLine 
[657]1#!/bin/sh
[1239]2# invirt-remote TYPE SERVICE [ARGS...]
[657]3#
4# We carry out the remctl command proxied to us by the remote-control server.
5
6TYPE="$1"
7SERVICE="$2"
8shift; shift;
9
10case "$TYPE" in
11    control)
12        # $SERVICE is hostname
[1239]13        COMMAND=/usr/sbin/invirt-vmcontrol
[2107]14    ;;
[657]15    web)
16        case "$SERVICE" in
17            lvcreate|lvremove|lvrename|lvresize)
[1239]18                COMMAND=/usr/sbin/invirt-lvm
[2107]19            ;;
[657]20            listvms)
[1239]21                COMMAND=/usr/sbin/invirt-listvms
[2104]22            ;;
[2289]23            availability|avail)
[2104]24                COMMAND=/usr/sbin/invirt-availability
25            ;;
[1401]26            vnccert)
27                COMMAND=/usr/bin/invirt-vnc-getcert
28                ;;
[657]29            *)
30                echo "ERROR: invalid subcommand"
[1164]31                exit 34
[657]32                ;;
33        esac
[2107]34    ;;
[657]35    *)
36        echo "ERROR: invalid command"
[1164]37        exit 34
[657]38        ;;
39esac
40
[2097]41$COMMAND "$SERVICE" "$@"
Note: See TracBrowser for help on using the repository browser.