summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-08-20 01:28:29 +0000
committerOlivier Blin <oblin@mandriva.com>2009-08-20 01:28:29 +0000
commitdb05e139aee319b0c596f9bb14177a607b088e16 (patch)
tree5d890e979cc9d2bf4eeec45cf1d4da03fcd34aa2
parentba712d62fe9f0a5da2a70036255ac0120ae55a2a (diff)
downloaddraklive-db05e139aee319b0c596f9bb14177a607b088e16.tar
draklive-db05e139aee319b0c596f9bb14177a607b088e16.tar.gz
draklive-db05e139aee319b0c596f9bb14177a607b088e16.tar.bz2
draklive-db05e139aee319b0c596f9bb14177a607b088e16.tar.xz
draklive-db05e139aee319b0c596f9bb14177a607b088e16.zip
enforce live->{system}{gfxboot}
-rwxr-xr-xdraklive47
1 files changed, 26 insertions, 21 deletions
diff --git a/draklive b/draklive
index 4c75eaf..327b890 100755
--- a/draklive
+++ b/draklive
@@ -483,14 +483,16 @@ sub create_bootloader {
create_classical_bootloader($live);
}
- run_({ root => $live->get_system_root }, '/usr/sbin/grub-gfxmenu', '--update-gfxmenu');
- my $boot_dir = $live->get_builddir . $live->{prefix}{build}{boot};
- mkdir_p($boot_dir);
- my $gfxmenu = $live->get_system_root . '/boot/gfxmenu';
- if (-e $gfxmenu) {
- cp_f($gfxmenu, $boot_dir);
- } else {
- warn "no gfxmenu file\n";
+ if ($live->{system}{gfxboot}) {
+ run_({ root => $live->get_system_root }, '/usr/sbin/grub-gfxmenu', '--update-gfxmenu');
+ my $boot_dir = $live->get_builddir . $live->{prefix}{build}{boot};
+ mkdir_p($boot_dir);
+ my $gfxmenu = $live->get_system_root . '/boot/gfxmenu';
+ if (-e $gfxmenu) {
+ cp_f($gfxmenu, $boot_dir);
+ } else {
+ warn "no gfxmenu file\n";
+ }
}
}
@@ -536,19 +538,22 @@ sub create_media_bootloader {
};
my $syslinux_dir = $live->get_builddir . $live->{prefix}{build}{boot} . '/syslinux';
mkdir_p($syslinux_dir);
- my $default_gfxboot_theme = "Mandriva";
- print "copying $default_gfxboot_theme gfxboot theme\n";
- cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$default_gfxboot_theme/install/*"), $syslinux_dir);
- if ($theme->{name} ne $default_gfxboot_theme) {
- print "copying $theme->{name} gfxboot theme\n";
- cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$theme->{name}/*"), $syslinux_dir);
+
+ if ($live->{system}{gfxboot}) {
+ my $default_gfxboot_theme = "Mandriva";
+ print "copying $default_gfxboot_theme gfxboot theme\n";
+ cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$default_gfxboot_theme/install/*"), $syslinux_dir);
+ if ($theme->{name} ne $default_gfxboot_theme) {
+ print "copying $theme->{name} gfxboot theme\n";
+ cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$theme->{name}/*"), $syslinux_dir);
+ }
+ my $bootlogo = $syslinux_dir . '/bootlogo';
+ warn "unable to find gfxboot splash ($bootlogo)\n" if ! -f $bootlogo;
+ my @locales = remove_unneeded_bootlogo_locales($bootlogo, get_langs($live));
+ output_p($syslinux_dir . '/langs', join("\n", @locales) . "\n");
+ output_p($syslinux_dir . '/gfxboot.cfg', join("\n", "livecd=1", "mainmenu.pos=210,235",
+ "mainmenu.bar.minwidth=400", "panel.f-key.fg=0x33358c"));
}
- my $bootlogo = $syslinux_dir . '/bootlogo';
- warn "unable to find gfxboot splash ($bootlogo)\n" if ! -f $bootlogo;
- my @locales = remove_unneeded_bootlogo_locales($bootlogo, get_langs($live));
- output_p($syslinux_dir . '/langs', join("\n", @locales) . "\n");
- output_p($syslinux_dir . '/gfxboot.cfg', join("\n", "livecd=1", "mainmenu.pos=210,235",
- "mainmenu.bar.minwidth=400", "panel.f-key.fg=0x33358c"));
output($live->get_builddir . $live->{prefix}{build}{boot} . '/help.msg',
pack("C*", 0x0E, 0x80, 0x03, 0x00, 0xC) . qq(
@@ -875,7 +880,7 @@ sub install_usb_bootloader {
#- FIXME: add get_grub_path (when building boot configuration files)
# and get_bootloader_path (when copying)
mkdir_p($live->{mnt} . $media_boot . '/grub');
- cp_f($live->get_builddir . $live->{prefix}{build}{boot} . '/gfxmenu', $live->{mnt} . $media_boot);
+ cp_f($live->get_builddir . $live->{prefix}{build}{boot} . '/gfxmenu', $live->{mnt} . $media_boot) if $live->{system}{gfxboot};
output_p($live->{mnt} . $media_boot . '/grub/menu.lst', build_grub_cfg($live, $media, $opts, $boot_device));
}