[Fai-commit] r6628 - trunk/lib

Thomas Lange lange at alioth.debian.org
Thu Jul 21 09:48:33 UTC 2011


Author: lange
Date: 2011-07-21 09:48:33 +0000 (Thu, 21 Jul 2011)
New Revision: 6628

Modified:
   trunk/lib/subroutines
Log:
cleanup code when to reboot or when to wait for keystroke


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2011-07-21 09:32:38 UTC (rev 6627)
+++ trunk/lib/subroutines	2011-07-21 09:48:33 UTC (rev 6628)
@@ -492,12 +492,16 @@
     local dir cdromdevice
     [ $do_init_tasks -eq 0 ] && exit 0
     wait_for_jobs
-    echo "Press <RETURN> to reboot."
     : ${flag_reboot:=0}
-    [ -s $LOGDIR/error.log -a "$flag_reboot" -gt "0" ] && sleep 10
-    # reboot without prompting if FAI_FLAG reboot is set
+
+    # Always reboot if error.log is empty or if flag reboot is set
+    if [ $flag_reboot -eq 0 ]; then
+	echo "Press <RETURN> to reboot."
+	read
+    else
+	sleep 10
+    fi
     sendmon "TASKEND faiend 0"
-    [ "$flag_reboot" -lt "1" ] && read
     echo "Rebooting $HOSTNAME now"
     sendmon "TASKEND reboot 0"
     cd /




More information about the Fai-commit mailing list