Skip to contentSkip to conversation

GRUB_HIDDEN_TIMEOUT may cause double timeout count

PATCH Mario Vazquez 1 participant 1 message Mar 18, 2010

lore
Share & tools
lore
#0 lore raw

Currently in grub 1.98 if a user enables the GRUB_HIDDEN_TIMEOUT entry in /etc/default/grub. The following code will be executed from /etc/grub.d/00_header.

if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
fi

That code performs the hidden timeout. Either when it expires, or is aborted with a key, it will start the regular timeout also. This behavior can be reproduced.

Here is a patch that changes that ${GRUB_TIMEOUT} to 0.

More info here: https://savannah.gnu.org/bugs/?29250

util/grub.d/00_header.in +1 -1
diff -ur grub-1.98.orig/util/grub.d/00_header.in grub-1.98/util/grub.d/00_header.in
@@ -150,7 +150,7 @@
   fi
   cat << EOF
 if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
-  set timeout=${GRUB_TIMEOUT}
+  set timeout=0
 fi
 EOF
 else