aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-03-15 17:58:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-03-15 17:58:51 +0000
commit3708f476d504d119ec021e2b7144e301f61f0682 (patch)
tree84a2ba113e8e4a9ad829387d5439195680695cd5
parentfbfc3a2fcbdd34e8d3c22a41c34f227656803748 (diff)
downloadbootsplash-3708f476d504d119ec021e2b7144e301f61f0682.tar
bootsplash-3708f476d504d119ec021e2b7144e301f61f0682.tar.gz
bootsplash-3708f476d504d119ec021e2b7144e301f61f0682.tar.bz2
bootsplash-3708f476d504d119ec021e2b7144e301f61f0682.tar.xz
bootsplash-3708f476d504d119ec021e2b7144e301f61f0682.zip
- use /usr/sbin/grub-gfxmenu to update grub gfxboot
- create a symlink /usr/share/gfxboot/themes/current (to be used by grub-gfxmenu)
-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
}