aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/switch-themes22
1 files 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
}