Last change
on this file since 2333 was
2292,
checked in by broder, 16 years ago
|
I totally failed to patch invirt-remote-/server/ instead of
invirt-remote-/host/.
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[830] | 1 | #!/bin/bash |
---|
[1176] | 2 | # invoke as invirt-remote-proxy-$TYPE, with "TYPE" in the remctl sense. |
---|
[659] | 3 | |
---|
[777] | 4 | klist -s || kinit -k |
---|
[624] | 5 | |
---|
[620] | 6 | TYPE="${0##*-}" |
---|
[624] | 7 | case "$TYPE" in |
---|
| 8 | control ) |
---|
[659] | 9 | MACHINE="$1"; SERVICE="$2"; shift; shift ;; |
---|
[624] | 10 | * ) |
---|
[659] | 11 | SERVICE="$1"; shift ;; |
---|
[620] | 12 | esac |
---|
[624] | 13 | |
---|
| 14 | case "$TYPE/$SERVICE" in |
---|
| 15 | web/listvms ) |
---|
[2097] | 16 | invirt-remote-listvms "$@" ;; |
---|
[1402] | 17 | web/vnccert ) |
---|
[2097] | 18 | invirt-remote-vnccert "$@" ;; |
---|
[2292] | 19 | web/availability | web/avail ) |
---|
[2188] | 20 | invirt-remote-availability "$@" ;; |
---|
[2255] | 21 | web/lvcreate | web/lvremove | web/lvrename | web/lvresize ) |
---|
[2256] | 22 | if [ -f "/etc/invirt/nolvm" ]; then |
---|
[2264] | 23 | echo "LVM operations are temporarily disabled for maintenance, sorry." >&2 |
---|
[2256] | 24 | exit 2 |
---|
| 25 | fi |
---|
[2255] | 26 | remctl "$(invirt-getconf hosts.0.hostname)" remote "$TYPE" "$SERVICE" "$@" ;; |
---|
[1665] | 27 | control/help ) |
---|
[2097] | 28 | invirt-remctl-help ;; |
---|
[1088] | 29 | control/create|control/install ) |
---|
[2256] | 30 | if [ -f "/etc/invirt/nocreate" ]; then |
---|
[2264] | 31 | echo "Booting VMs is temporarily disabled for maintenance, sorry." >&2 |
---|
[2256] | 32 | exit 2 |
---|
| 33 | fi |
---|
[2097] | 34 | invirt-remote-create "$SERVICE" "$MACHINE" "$@" ;; |
---|
[1161] | 35 | control/listhost|control/list-host ) |
---|
[2097] | 36 | invirt-remote-listhost "$MACHINE" "$@" ;; |
---|
[625] | 37 | control/* ) |
---|
| 38 | # Everything but create must go where the VM is already running. |
---|
[2097] | 39 | invirt-remote-control "$MACHINE" "$SERVICE" "$@" ;; |
---|
[624] | 40 | * ) |
---|
[2255] | 41 | echo "ERROR: invalid subcommand" |
---|
| 42 | exit 34 |
---|
| 43 | ;; |
---|
[624] | 44 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.