[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#416986: raise timeout when other OS is detected



Package: grub-installer
Severity: normal
Tags: patch

When another OS is detected, 5s timeout is too low, since the decision to use
non-default option might happen very often.  In fact, it can even be the
preferred one: think of Windows user who installs Debian to play around with
it now and then, and feels embarassed that Debian has set up itself not only
as the default, but also with very low timeout to react.

Attached patch rises it to 30s when os-prober has detected another OS (leaves
it to 5s otherwise).

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Index: otheros.sh
===================================================================
--- otheros.sh	(revision 46095)
+++ otheros.sh	(working copy)
@@ -1,4 +1,13 @@
+grub_raise_timeout() {
+	sed -i $ROOT/boot/grub/$menu_file -e "s/^\(timeout\)\t\t.*/\1\t\t30/g"
+} # grub_raise_timeout end
+
+grub2_raise_timeout() {
+	sed -i $ROOT/boot/grub/$menu_file -e "s/^\(set \+timeout\)=.*/\1=30/g"
+} # grub2_raise_timeout end
+
 grub_write_chain() {
+	grub_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for a non-linux OS
@@ -35,6 +44,7 @@
 } # grub_write_chain end
 
 grub2_write_chain() {
+	grub2_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for a non-linux OS
@@ -48,6 +58,7 @@
 } # grub2_write_chain end
 
 grub_write_linux() {
+	grub_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for an existing
@@ -69,6 +80,7 @@
 } # grub_write_linux end
 
 grub2_write_linux() {
+	grub2_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for an existing
@@ -89,6 +101,7 @@
 } # grub2_write_linux end
 
 grub_write_hurd() {
+	grub_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for an existing
@@ -110,6 +123,7 @@
 } # grub_write_hurd end
 
 grub2_write_hurd() {
+	grub2_raise_timeout
 	cat >> $tmpfile <<EOF
 
 # This entry automatically added by the Debian installer for an existing

Reply to: