summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2009-07-13 15:36:46 +0200
committerMartin Sivak <msivak@redhat.com>2009-07-13 15:36:46 +0200
commit1810be1e1ca0d604a899c95a1c80f5f0bcee5727 (patch)
tree27b5065e4ad7adc88b97149b0470b37cb3b90d2b
parentf21639f4db37b31e35c62fd67b8b2aa0d9bf8071 (diff)
downloadfirstaidkit-1810be1e1ca0d604a899c95a1c80f5f0bcee5727.tar.gz
firstaidkit-1810be1e1ca0d604a899c95a1c80f5f0bcee5727.tar.xz
firstaidkit-1810be1e1ca0d604a899c95a1c80f5f0bcee5727.zip
Add a timeout. Timeout and cancel return error code
-rwxr-xr-xfirstaidkit-qs11
1 files changed, 8 insertions, 3 deletions
diff --git a/firstaidkit-qs b/firstaidkit-qs
index ab80935..cbdae59 100755
--- a/firstaidkit-qs
+++ b/firstaidkit-qs
@@ -19,9 +19,14 @@ TITLE="First Aid Kit quickstart menu"
WIDTH="45"
HEIGHT="15"
MENUHEIGHT="12"
+TIMEOUT=60
+
+while [ "x$OPTION" == "x" ]; do
+ $DIALOG --timeout "$TIMEOUT" --menu "$TITLE" "$HEIGHT" "$WIDTH" "$MENUHEIGHT" shell "Start shell" fakd "Run diagnostic" reboot "Reboot" 2>$TMPFILE
+ if [ "$?" -ne 0 ]; then
+ exit 1
+ fi
-#while [ "x$OPTION" == "x" ]; do
- $DIALOG --menu "$TITLE" "$HEIGHT" "$WIDTH" "$MENUHEIGHT" shell "Start shell" fakd "Run diagnostic" reboot "Reboot" 2>$TMPFILE
OPTION=$(cat $TMPFILE)
if [ "x$OPTION" == "xshell" ]; then
@@ -35,4 +40,4 @@ MENUHEIGHT="12"
reboot
fi
-#done
+done