aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-10-18 08:27:59 +0000
committerFlorent Villard <warly@mandriva.com>2006-10-18 08:27:59 +0000
commitf23d1861db32645e71e71f04bc8764a2c786562e (patch)
tree23afdd2e05e223a524cf8823e0b222d8b2dadd28 /scripts
parent853f4780aa84916638738c4520716697f6978ef7 (diff)
downloadbootsplash-f23d1861db32645e71e71f04bc8764a2c786562e.tar
bootsplash-f23d1861db32645e71e71f04bc8764a2c786562e.tar.gz
bootsplash-f23d1861db32645e71e71f04bc8764a2c786562e.tar.bz2
bootsplash-f23d1861db32645e71e71f04bc8764a2c786562e.tar.xz
bootsplash-f23d1861db32645e71e71f04bc8764a2c786562e.zip
added grub support in the theme
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make-boot-splash5
-rwxr-xr-xscripts/switch-themes16
2 files changed, 21 insertions, 0 deletions
diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash
index 6a5a236..0575cb2 100755
--- a/scripts/make-boot-splash
+++ b/scripts/make-boot-splash
@@ -40,6 +40,11 @@ if [[ -f $splash_dir/themes/$THEME/lilo/message ]];then
cp -f $splash_dir/themes/$THEME/lilo/message /boot/message-graphic
fi
+if [[ -f $splash_dir/themes/$THEME/grub/splash.xpm.gz && -d /boot/grub/ ]];then
+ rm -f /boot/grub/splash.xpm.gz
+ cp -f $splash_dir/themes/$THEME/grub/splash.xpm.gz /boot/grub/splash.xpm.gz
+fi
+
if [[ -z $config ]];then
echo "Can't find a config file for resolution $resolution";
exit 1;
diff --git a/scripts/switch-themes b/scripts/switch-themes
index 5f9b0d7..678dbdd 100755
--- a/scripts/switch-themes
+++ b/scripts/switch-themes
@@ -55,6 +55,20 @@ function lilo_switch_themes () {
fi
}
+function grub_switch_themes () {
+ local theme=$1
+ local message_from_theme=$bootsplashdir/themes/$theme/grub/splash.xpm.gz
+ local message_from_current=$bootdir/grub/splash.xpm.gz
+
+ #checking
+ if [[ ! -f $message_from_theme ]];then
+ return;
+ fi
+
+ rm -f $message_from_current
+ cp -f $message_from_theme $message_from_current
+}
+
function check_it () {
local theme=$1
local ok= c=
@@ -72,6 +86,7 @@ function check_it () {
function update () {
local theme=$1;
lilo_switch_themes $theme
+ grub_switch_themes $theme
}
function switch_theme () {
@@ -106,6 +121,7 @@ function switch_theme () {
fi
fi
lilo_switch_themes $toswitch
+ grub_switch_themes $toswitch
}
function update_boot () {