summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-09 10:03:40 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-09 10:03:40 +1000
commit5d290eee0eb50eded9c107e5332b4e76c185edb8 (patch)
treeb016a1f299f0968f4c5fe25b998ef8458ae3f176
parentf5ca76b1ed81ddfda3d5ec60c1a3c2ba91092f3e (diff)
vircmd doesn't need the config file
-rwxr-xr-xvircmd11
1 files changed, 4 insertions, 7 deletions
diff --git a/vircmd b/vircmd
index c25d293..b262723 100755
--- a/vircmd
+++ b/vircmd
@@ -8,8 +8,6 @@ else
installdir="`dirname \"$autocluster\"`"
fi
-config="config"
-
####################
# show program usage
usage ()
@@ -17,7 +15,6 @@ usage ()
cat >&2 <<EOF
Usage: vircmd [OPTION] ... <COMMAND>
options:
- -c <file> specify config file (default is "config")
-x enable script debugging
commands:
@@ -39,7 +36,7 @@ EOF
############################
# parse command line options
-temp=$(getopt -n "$prog" -o "c:x" -l help -- "$@")
+temp=$(getopt -n "$prog" -o "x" -l help -- "$@")
[ $? != 0 ] && usage
@@ -47,7 +44,6 @@ eval set -- "$temp"
while true ; do
case "$1" in
- -c) config="$2" ; shift; shift ;;
-x) set -x; shift ;;
--) shift ; break ;;
-h|--help|*) usage ;; # Shouldn't happen, so this is reasonable.
@@ -55,7 +51,6 @@ while true ; do
done
. "$installdir/config.default"
-. "`dirname $config`/$config"
. "$installdir/functions"
if [ $# -lt 2 ]; then
@@ -67,7 +62,9 @@ cmd="$1"
cluster="$2"
count=0
-for i in $(seq 1 $NUMNODES) ; do
+MAXNODES=8
+
+for i in $(seq 1 $MAXNODES) ; do
name="${cluster}n${i}"
virsh dominfo "$name" > /dev/null 2>&1 && {
$VIRSH $cmd "$name"