Changeset 659


Ignore:
Timestamp:
Jun 28, 2008, 11:45:16 PM (17 years ago)
Author:
price
Message:

sipb-xen-remote-proxy: refactor argument parsing and passing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remote-proxy

    r625 r659  
    11#!/bin/sh
    22# invoke as sipb-xen-remote-proxy-$TYPE, with "TYPE" in the remctl sense.
     3
    34klist -s || kinit -k host/remote.mit.edu
    45
     
    67case "$TYPE" in
    78    control )
    8         SERVICE="$2" ;;
     9        MACHINE="$1"; SERVICE="$2"; shift; shift ;;
    910    * )
    10         SERVICE="$1" ;;
     11        SERVICE="$1"; shift ;;
    1112esac
    1213
    1314case "$TYPE/$SERVICE" in
    1415    web/listvms )
    15         shift; sipb-xen-remote-listvms "$@" ;;
     16        sipb-xen-remote-listvms "$@" ;;
    1617    control/create )
    17         remctl black-mesa remote "$TYPE" "$@" ;;
     18        remctl black-mesa remote "$TYPE" "$MACHINE" "$SERVICE" "$@" ;;
    1819    control/* )
    1920        # Everything but create must go where the VM is already running.
    20         sipb-xen-remote-control "$@" ;;
     21        sipb-xen-remote-control "$MACHINE" "$SERVICE" "$@" ;;
    2122    * )
    22         remctl black-mesa remote "$TYPE" "$@" ;;
     23        remctl black-mesa remote "$TYPE" "$SERVICE" "$@" ;;
    2324esac
Note: See TracChangeset for help on using the changeset viewer.