source:
trunk/packages/invirt-remote-host/files/usr/sbin/invirt-remote
@
1314
Last change on this file since 1314 was 1239, checked in by broder, 16 years ago | |
---|---|
|
|
File size: 848 bytes |
Rev | Line | |
---|---|---|
[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 | ||
6 | TYPE="$1" | |
7 | SERVICE="$2" | |
8 | shift; shift; | |
9 | ||
10 | case "$TYPE" in | |
11 | control) | |
12 | # $SERVICE is hostname | |
[1239] | 13 | COMMAND=/usr/sbin/invirt-vmcontrol |
[657] | 14 | ;; |
15 | web) | |
16 | case "$SERVICE" in | |
17 | lvcreate|lvremove|lvrename|lvresize) | |
[1239] | 18 | COMMAND=/usr/sbin/invirt-lvm |
[657] | 19 | ;; |
20 | vmboot) | |
[1239] | 21 | COMMAND=/usr/sbin/invirt-vmcontrol |
[657] | 22 | ;; |
23 | listvms) | |
[1239] | 24 | COMMAND=/usr/sbin/invirt-listvms |
[657] | 25 | ;; |
26 | info) | |
27 | COMMAND=/usr/sbin/xm | |
28 | ;; | |
29 | *) | |
30 | echo "ERROR: invalid subcommand" | |
[1164] | 31 | exit 34 |
[657] | 32 | ;; |
33 | esac | |
34 | ;; | |
35 | *) | |
36 | echo "ERROR: invalid command" | |
[1164] | 37 | exit 34 |
[657] | 38 | ;; |
39 | esac | |
40 | ||
41 | $COMMAND "$SERVICE" "$@" |
Note: See TracBrowser
for help on using the repository browser.