From db05e139aee319b0c596f9bb14177a607b088e16 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 20 Aug 2009 01:28:29 +0000 Subject: enforce live->{system}{gfxboot} --- draklive | 47 ++++++++++++++++++++++++++--------------------- 1 file 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)); } -- cgit v1.2.1