All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Integrate hiddenmenu
@ 2009-08-10 10:38 Colin Watson
  2009-08-10 11:44 ` Robert Millan
  0 siblings, 1 reply; 7+ messages in thread
From: Colin Watson @ 2009-08-10 10:38 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

I'd like to integrate http://grub.enbug.org/Hiddenmenu as a
grub-mkconfig option so that we can use it by default in Ubuntu. How
does the attached patch look? I dropped the --verbose from the wiki page
since I personally prefer it to be silent, although obviously this could
be patched in or out as desired. I also moved the timeout down to after
the point when the graphical terminal is initialised, to decrease the
period when GRUB isn't in the desired screen resolution.

2009-08-10  Colin Watson  <cjwatson@ubuntu.com>

        * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
        * util/grub.d/00_header.in: Enter interruptible sleep if
        GRUB_HIDDEN_TIMEOUT is set.

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]

[-- Attachment #2: grub2-hidden-timeout.diff --]
[-- Type: text/x-diff, Size: 1712 bytes --]

diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub-mkconfig.in grub2-1.96+20090725.new/util/grub-mkconfig.in
--- grub2-1.96+20090725/util/grub-mkconfig.in	2009-08-08 19:31:00.000000000 +0100
+++ grub2-1.96+20090725.new/util/grub-mkconfig.in	2009-08-08 21:05:05.000000000 +0100
@@ -173,7 +173,7 @@
 export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
 
 # These are optional, user-defined variables.
-export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
+export GRUB_DEFAULT GRUB_HIDDEN_TIMEOUT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new
diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub.d/00_header.in grub2-1.96+20090725.new/util/grub.d/00_header.in
--- grub2-1.96+20090725/util/grub.d/00_header.in	2009-08-08 21:05:02.000000000 +0100
+++ grub2-1.96+20090725.new/util/grub.d/00_header.in	2009-08-08 21:06:12.000000000 +0100
@@ -37,7 +37,6 @@
 
 cat << EOF
 set default=${GRUB_DEFAULT}
-set timeout=${GRUB_TIMEOUT}
 EOF
 
 case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
@@ -112,3 +111,15 @@
 EOF
   ;;
 esac
+
+if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
+  cat << EOF
+if sleep --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
+  set timeout=${GRUB_TIMEOUT}
+fi
+EOF
+else
+  cat << EOF
+set timeout=${GRUB_TIMEOUT}
+EOF
+fi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-10 10:38 [PATCH] Integrate hiddenmenu Colin Watson
@ 2009-08-10 11:44 ` Robert Millan
  2009-08-10 11:55   ` Colin Watson
  2009-08-10 12:21   ` Vladimir 'phcoder' Serbinenko
  0 siblings, 2 replies; 7+ messages in thread
From: Robert Millan @ 2009-08-10 11:44 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote:
> I'd like to integrate http://grub.enbug.org/Hiddenmenu as a
> grub-mkconfig option so that we can use it by default in Ubuntu. How
> does the attached patch look? I dropped the --verbose from the wiki page
> since I personally prefer it to be silent, although obviously this could
> be patched in or out as desired. I also moved the timeout down to after
> the point when the graphical terminal is initialised, to decrease the
> period when GRUB isn't in the desired screen resolution.

GRUB Legacy users would expect the verbose behaviour.  I tend to prefer
making that the default.  Does anyone else prefer silent?

If we default to verbose, we could also have an option to turn it off from
/etc/default/grub, if that makes life easier for you.

Other than this, the patch itself looks fine.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-10 11:44 ` Robert Millan
@ 2009-08-10 11:55   ` Colin Watson
  2009-08-10 15:10     ` Robert Millan
  2009-08-10 12:21   ` Vladimir 'phcoder' Serbinenko
  1 sibling, 1 reply; 7+ messages in thread
From: Colin Watson @ 2009-08-10 11:55 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Aug 10, 2009 at 01:44:50PM +0200, Robert Millan wrote:
> On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote:
> > I'd like to integrate http://grub.enbug.org/Hiddenmenu as a
> > grub-mkconfig option so that we can use it by default in Ubuntu. How
> > does the attached patch look? I dropped the --verbose from the wiki page
> > since I personally prefer it to be silent, although obviously this could
> > be patched in or out as desired. I also moved the timeout down to after
> > the point when the graphical terminal is initialised, to decrease the
> > period when GRUB isn't in the desired screen resolution.
> 
> GRUB Legacy users would expect the verbose behaviour.  I tend to prefer
> making that the default.  Does anyone else prefer silent?

This also comes from our design people, who have told me that by default
the boot loader "should not have any visible representation". That
obviously doesn't necessarily mean it has to be the upstream default
though! :-)

> If we default to verbose, we could also have an option to turn it off from
> /etc/default/grub, if that makes life easier for you.

Slightly, I suppose. I thought there were some feelings against
excessive numbers of options which is why I didn't suggest that.
GRUB_HIDDEN_TIMEOUT_QUIET=1?

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-10 11:44 ` Robert Millan
  2009-08-10 11:55   ` Colin Watson
@ 2009-08-10 12:21   ` Vladimir 'phcoder' Serbinenko
  1 sibling, 0 replies; 7+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-08-10 12:21 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Aug 10, 2009 at 1:44 PM, Robert Millan<rmh@aybabtu.com> wrote:
> On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote:
>> I'd like to integrate http://grub.enbug.org/Hiddenmenu as a
>> grub-mkconfig option so that we can use it by default in Ubuntu. How
>> does the attached patch look? I dropped the --verbose from the wiki page
>> since I personally prefer it to be silent, although obviously this could
>> be patched in or out as desired. I also moved the timeout down to after
>> the point when the graphical terminal is initialised, to decrease the
>> period when GRUB isn't in the desired screen resolution.
>
> GRUB Legacy users would expect the verbose behaviour.  I tend to prefer
> making that the default.  Does anyone else prefer silent?
A timeout with a black screen gives a very bad impression. For a
distro it can be ok since you'll probably provide a nice splash image
but since upstream provides none I prefer it to be verbose by default
>
> If we default to verbose, we could also have an option to turn it off from
> /etc/default/grub, if that makes life easier for you.
>
> Other than this, the patch itself looks fine.
>
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-10 11:55   ` Colin Watson
@ 2009-08-10 15:10     ` Robert Millan
  2009-08-13  9:45       ` Colin Watson
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Millan @ 2009-08-10 15:10 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Aug 10, 2009 at 12:55:05PM +0100, Colin Watson wrote:
> > If we default to verbose, we could also have an option to turn it off from
> > /etc/default/grub, if that makes life easier for you.
> 
> Slightly, I suppose. I thought there were some feelings against
> excessive numbers of options which is why I didn't suggest that.
> GRUB_HIDDEN_TIMEOUT_QUIET=1?

For this one I don't mind.  But would you please make it "(true|false)" ?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-10 15:10     ` Robert Millan
@ 2009-08-13  9:45       ` Colin Watson
  2009-08-13 20:08         ` Robert Millan
  0 siblings, 1 reply; 7+ messages in thread
From: Colin Watson @ 2009-08-13  9:45 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

On Mon, Aug 10, 2009 at 05:10:31PM +0200, Robert Millan wrote:
> On Mon, Aug 10, 2009 at 12:55:05PM +0100, Colin Watson wrote:
> > > If we default to verbose, we could also have an option to turn it off from
> > > /etc/default/grub, if that makes life easier for you.
> > 
> > Slightly, I suppose. I thought there were some feelings against
> > excessive numbers of options which is why I didn't suggest that.
> > GRUB_HIDDEN_TIMEOUT_QUIET=1?
> 
> For this one I don't mind.  But would you please make it "(true|false)" ?

OK. How's this?

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]

[-- Attachment #2: grub2-hidden-timeout.diff --]
[-- Type: text/x-diff, Size: 1860 bytes --]

diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub-mkconfig.in grub2-1.96+20090725.new/util/grub-mkconfig.in
--- grub2-1.96+20090725/util/grub-mkconfig.in	2009-08-08 19:31:00.000000000 +0100
+++ grub2-1.96+20090725.new/util/grub-mkconfig.in	2009-08-13 09:39:20.000000000 +0100
@@ -173,7 +173,7 @@
 export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
 
 # These are optional, user-defined variables.
-export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
+export GRUB_DEFAULT GRUB_HIDDEN_TIMEOUT GRUB_HIDDEN_TIMEOUT_QUIET GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new
diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub.d/00_header.in grub2-1.96+20090725.new/util/grub.d/00_header.in
--- grub2-1.96+20090725/util/grub.d/00_header.in	2009-08-13 09:32:50.000000000 +0100
+++ grub2-1.96+20090725.new/util/grub.d/00_header.in	2009-08-13 09:39:20.000000000 +0100
@@ -37,7 +37,6 @@
 
 cat << EOF
 set default=${GRUB_DEFAULT}
-set timeout=${GRUB_TIMEOUT}
 EOF
 
 case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
@@ -112,3 +111,20 @@
 EOF
   ;;
 esac
+
+if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
+  if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then 
+    verbose=
+  else
+    verbose=" --verbose"
+  fi
+  cat << EOF
+if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
+  set timeout=${GRUB_TIMEOUT}
+fi
+EOF
+else
+  cat << EOF
+set timeout=${GRUB_TIMEOUT}
+EOF
+fi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Integrate hiddenmenu
  2009-08-13  9:45       ` Colin Watson
@ 2009-08-13 20:08         ` Robert Millan
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Millan @ 2009-08-13 20:08 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Aug 13, 2009 at 10:45:48AM +0100, Colin Watson wrote:
> On Mon, Aug 10, 2009 at 05:10:31PM +0200, Robert Millan wrote:
> > On Mon, Aug 10, 2009 at 12:55:05PM +0100, Colin Watson wrote:
> > > > If we default to verbose, we could also have an option to turn it off from
> > > > /etc/default/grub, if that makes life easier for you.
> > > 
> > > Slightly, I suppose. I thought there were some feelings against
> > > excessive numbers of options which is why I didn't suggest that.
> > > GRUB_HIDDEN_TIMEOUT_QUIET=1?
> > 
> > For this one I don't mind.  But would you please make it "(true|false)" ?
> 
> OK. How's this?

Committed (with a small adjustment), thanks.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-13 20:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 10:38 [PATCH] Integrate hiddenmenu Colin Watson
2009-08-10 11:44 ` Robert Millan
2009-08-10 11:55   ` Colin Watson
2009-08-10 15:10     ` Robert Millan
2009-08-13  9:45       ` Colin Watson
2009-08-13 20:08         ` Robert Millan
2009-08-10 12:21   ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.