From 3708f476d504d119ec021e2b7144e301f61f0682 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 15 Mar 2007 17:58:51 +0000 Subject: - use /usr/sbin/grub-gfxmenu to update grub gfxboot - create a symlink /usr/share/gfxboot/themes/current (to be used by grub-gfxmenu) --- scripts/switch-themes | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/scripts/switch-themes b/scripts/switch-themes index 6630107..bb0acdb 100755 --- a/scripts/switch-themes +++ b/scripts/switch-themes @@ -56,17 +56,9 @@ function lilo_switch_themes () { } function grub_switch_themes () { - local theme=$1 - local background_dir=/usr/share/gfxboot/themes/$theme/ - local gfxmenu=$bootdir/gfxmenu - - #checking - if [[ ! -f "$background_dir/back.jpg" ]];then - return; + if [ -x /usr/sbin/grub-gfxmenu ]; then + /usr/sbin/grub-gfxmenu --update-theme fi - - cpio-filter --in-place --exclude back.jpg $gfxmenu - echo back.jpg | (cd $background_dir ; cpio -o --quiet -O $gfxmenu --append) } function check_it () { @@ -85,12 +77,10 @@ function check_it () { function update () { local theme=$1; - # 20061208 warly - # with grub as default and gfxboot we should now only update - # the current link in /usr/share/bootsplash/themes - #lilo_switch_themes $theme - #grub_switch_themes $theme - # + + rm -f /usr/share/gfxboot/themes/current + ln -s $theme /usr/share/gfxboot/themes/current + rm -f $bootsplashdir/current ln -s $theme $bootsplashdir/current } -- cgit v1.2.1