[X2Go-Commits] [maintenancescripts] 01/01: killstalevms.bash: initialize loop variable.

git-admin at x2go.org git-admin at x2go.org
Thu Feb 12 02:37:35 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository maintenancescripts.

commit 953a842143464accaadc9c8ff3ff00a429528a4c
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Feb 12 02:37:29 2015 +0100

    killstalevms.bash: initialize loop variable.
---
 killstalevms.bash |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/killstalevms.bash b/killstalevms.bash
index 9321977..3789ac9 100644
--- a/killstalevms.bash
+++ b/killstalevms.bash
@@ -47,15 +47,16 @@ for ((i = 0; i < ${#BUILDER_LIST[@]}; ++i)); do
   DIALOGMENU+=("$i" "${VM_LIST[$i]}: ${COMPONENT_LIST[$i]} (${VERSION_LIST[$i]}) for ${BRANCH_LIST[$i]}")
 done
 
-while [ "${RESULT}" -eq 0 ]; do
+RESULT="0"
+while [ "${RESULT}" -eq "0" ]; do
   MOREINFO=$(dialog --menu "Select VM to kill" 0 0 10 "${DIALOGMENU[@]}")
   RESULT="$?"
 
-  if [ "${RESULT}" -eq 0 ]; then
+  if [ "${RESULT}" -eq "0" ]; then
     dialog --yesno "PID: ${VM_LIST[${MOREINFO}]}\nComponent: ${COMPONENT_LIST[${MOREINFO}]}\nVersion: ${VERSION_LIST[${MOREINFO}]}\nOS: ${SYSTEM_LIST[${MOREINFO}]} -- ${SYSTEM_VERSION_LIST[${MOREINFO}]} -- ${ARCH_LIST[${MOREINFO}]}\nBranch: ${BRANCH_LIST[${MOREINFO}]}\n\nPlease check that this job is currently not being actively executed by Jenkins!\n\nAre you sure you want to kill this process?" 0 0
     RESULT="$?"
 
-    if [ "${RESULT}" -eq 0 ]; then
+    if [ "${RESULT}" -eq "0" ]; then
       echo kill -9 "${VM_LIST[${MOREINFO}]}"
     fi
   fi

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git


More information about the x2go-commits mailing list