summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-28 08:19:44 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-28 08:19:44 +0000
commitb39e515a36515bd3553b542ee3bea343ba8bdbdd (patch)
tree91120210c2a17229a692d2dbd7a10da17b5e73ef
parent13f304a0a94b09d53acb2a9ab44e46531305df8a (diff)
downloaddraklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar
draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.gz
draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.bz2
draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.tar.xz
draklive-b39e515a36515bd3553b542ee3bea343ba8bdbdd.zip
make bootloader timeout configurable
-rwxr-xr-xdraklive10
1 files changed, 8 insertions, 2 deletions
diff --git a/draklive b/draklive
index 8682ddb..54180d1 100755
--- a/draklive
+++ b/draklive
@@ -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 {