diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-28 08:19:44 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-28 08:19:44 +0000 |
commit | b39e515a36515bd3553b542ee3bea343ba8bdbdd (patch) | |
tree | 91120210c2a17229a692d2dbd7a10da17b5e73ef | |
parent | 13f304a0a94b09d53acb2a9ab44e46531305df8a (diff) | |
download | draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.gz draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.bz2 draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.xz draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.zip |
make bootloader timeout configurable
-rwxr-xr-x | draklive | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -571,6 +571,11 @@ sub get_default_append { ); } +sub get_bootloader_timeout { + my ($live) = @_; + defined $live->{media}{bootloader_timeout} ? $live->{media}{bootloader_timeout} : 4; +} + my @syslinux_boot_files = qw(/vmlinuz /syslinux/bootlogo /help.msg); sub build_syslinux_cfg { @@ -581,10 +586,11 @@ sub build_syslinux_cfg { my ($initrd, $kernel, $bootlogo, $help) = map { $to_root ? basename($_) : $_ } map { $live->{prefix}{media}{boot} . $_ } get_initrd_path($media), @syslinux_boot_files; my $has_bootlogo = -e get_builddir($live) . $live->{prefix}{build}{boot} . '/syslinux/bootlogo'; + my $timeout = get_bootloader_timeout($live) * 10; join("\n", "default $live->{media}{title}", "prompt 1", - "timeout 40", + "timeout $timeout", $has_bootlogo ? "gfxboot $bootlogo" : "display $help", (map { my ($name, $cmdline) = @$_; @@ -603,7 +609,7 @@ sub build_grub_cfg { my ($part_nb) = $device =~ /(\d+)$/; my $grub_part = "(hd0" . (defined $part_nb ? "," . ($part_nb-1) : "") . ")"; join("\n", - "timeout 4", + "timeout " . get_bootloader_timeout($live), "gfxmenu $grub_part" . $live->{prefix}{media}{boot} . "/gfxmenu", "default 0", (map { |