From f46a14386632991b2805c90fd95f16e049198b10 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 19 Mar 2012 18:35:17 +0000 Subject: Update drakboot splash updating code. Note: This is no longer used, but for completeness I am making it support the splash + quiet kernel command line params. --- perl-install/standalone/drakboot | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'perl-install/standalone/drakboot') diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index bdbfc80d6..91a9c8db5 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -127,10 +127,9 @@ sub splash_choice() { my $boot_warn = 1; my %modes = ( text => N("Text only"), - verbose => N("Verbose"), - silent => N("Silent"), + splash => N("Silent"), ); - my $mode_combo = gtknew('ComboBox', text => $modes{$theme->{enabled} ? $cmdline =~ /\bsplash=silent\b/ ? 'silent' : 'verbose' : 'text'}, list => [ values %modes ]); + my $mode_combo = gtknew('ComboBox', text => $modes{$theme->{enabled} ? $cmdline =~ /\bsplash\b/ && $cmdline =~ /\bquiet\b/ ? 'splash' : 'text' : 'text'}, list => [ values %modes ]); $mode_combo->entry->signal_connect(changed => sub { $theme->{enabled} = $mode_combo->entry->get_text ne $modes{text}; if ($boot_warn && !$bootsplash_available && $theme->{enabled}) { @@ -165,7 +164,7 @@ sub splash_choice() { } my $text = $mode_combo->entry->get_text; my $mode = find { $modes{$_} eq $text } keys %modes; - set_splash_append($mode ne 'text' ? $mode : undef); + set_splash_append($mode); }); } @@ -242,8 +241,13 @@ sub change_image { sub set_splash_append { my ($val) = @_; - bootloader::set_append_with_key($bootloader, 'splash', undef); - bootloader::set_append_with_key($bootloader, 'splash', $val); + if ($mode ne 'splash') { + bootloader::remove_append_simple($bootloader, 'splash'); + bootloader::remove_append_simple($bootloader, 'quiet'); + } else { + bootloader::set_append_simple($bootloader, 'splash'); + bootloader::set_append_simple($bootloader, 'quiet'); + } modify_bootloader($bootloader, $all_hds); } -- cgit v1.2.1