summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2010-06-11 14:05:54 +0000
committerMarian Csontos <mcsontos@redhat.com>2010-06-11 14:05:54 +0000
commit612f292a04494de5b13e8a46eccb6c01c878358d (patch)
tree0126ae27e8b9d40cb2c96d8c1478a863bd1e7497
parent39d833b947feca1053f7828e035ca9c728792a11 (diff)
Fixed introduced regression and further improvements.rh-tests-distribution-reservesys-2_0-43
-rwxr-xr-xTasks/distribution/reservesys/runtest.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/Tasks/distribution/reservesys/runtest.sh b/Tasks/distribution/reservesys/runtest.sh
index d5d436e..4daa3ed 100755
--- a/Tasks/distribution/reservesys/runtest.sh
+++ b/Tasks/distribution/reservesys/runtest.sh
@@ -41,8 +41,6 @@ MOTD()
watchdog="$inventory/recipes/$RECIPEID"
system="$inventory/view/$HOSTNAME"
fi
- else
- fi
mv $FILE $FILE.orig
cat <<END > $FILE
@@ -105,10 +103,14 @@ SCRIPT2=/usr/bin/extendtesttime.sh
cat > $SCRIPT2 <<-EOF
howmany()
{
-echo "How many hours would you like to extend the reservation."
-echo " Must be between 1 and 99 "
-read RESPONSE
-validint \$RESPONSE 1 99
+if [ -z "\$1" ]; then
+ read RESPONSE
+else
+ echo "How many hours would you like to extend the reservation."
+ echo " Must be between 1 and 99 "
+ RESPONSE="\$1"
+fi
+validint "\$RESPONSE" 1 99
echo "Extending reservation time \$RESPONSE"
EXTRESTIME=\$(echo \$RESPONSE)h
}
@@ -152,7 +154,7 @@ fi
return 0
}
-howmany
+howmany "\$1"
export RESULT_SERVER=$RESULT_SERVER
export HOSTNAME=$HOSTNAME
@@ -170,10 +172,12 @@ NOTIFY()
{
/sbin/service sendmail start
local msg=$(mktemp)
+ local tag=
+ [[ -n "$CALLED_BY_BEAH" ]] && tag="[Beaker Machine Reserved] "
cat > $msg <<-EOF
To: $SUBMITTER
-Subject: $HOSTNAME
+Subject: $tag$HOSTNAME
X-RHTS-test: $TEST
EOF