diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-08 11:51:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-08 11:51:56 +0000 |
commit | c962365315fb42b07df962941419310d7dcd5feb (patch) | |
tree | 0aa5aac8cf3dadb19bd3a3c1b0f82cc9624e83bd /grub-gfxmenu | |
parent | 534f2f4437093bd78411126ef45de41fc6b93bf3 (diff) | |
download | bootloader-theme-c962365315fb42b07df962941419310d7dcd5feb.tar bootloader-theme-c962365315fb42b07df962941419310d7dcd5feb.tar.gz bootloader-theme-c962365315fb42b07df962941419310d7dcd5feb.tar.bz2 bootloader-theme-c962365315fb42b07df962941419310d7dcd5feb.tar.xz bootloader-theme-c962365315fb42b07df962941419310d7dcd5feb.zip |
re-sync after the big svn loss0.21
Diffstat (limited to 'grub-gfxmenu')
-rwxr-xr-x | grub-gfxmenu | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/grub-gfxmenu b/grub-gfxmenu index 28b0efe..9da113a 100755 --- a/grub-gfxmenu +++ b/grub-gfxmenu @@ -8,15 +8,22 @@ my %options = ( "lang=s" => \ (my $lang), "update-theme" => \ (my $update_theme), "update-gfxmenu" => \ (my $update_gfxmenu), + "quiet" => \ (my $quiet), ); GetOptions(%options) && @ARGV == 0 && ($lang || $update_theme || $update_gfxmenu) or usage(); if ($update_gfxmenu) { $update_theme = 1; - $lang ||= get_lang(); + $lang ||= eval { get_lang() }; sys('cp', '/usr/share/gfxboot/themes/Mandriva/boot/message', $gfxmenu); } + +if (!-e $gfxmenu) { + warn "$gfxmenu doesn't exist\n" if !$quiet; + exit; +} + if ($lang) { set_lang($lang); } @@ -25,7 +32,7 @@ if ($update_theme) { } sub usage { - die "grub-gfxmenu [--lang <lang>] [--update-theme] [--update-gfxmenu]\n"; + die "grub-gfxmenu [--quiet] [--lang <lang>] [--update-theme] [--update-gfxmenu]\n"; } sub set_theme() { |