aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/switch-themes
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2009-10-07 14:43:17 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2009-10-07 14:43:17 +0000
commit88e8551b2edd61408e12fdc7cf961dc23fbef8bc (patch)
tree26d397697f0aa0fc2a19e8693d7d53b7352646ff /scripts/switch-themes
parent9b530ac7424a69506b5c4d2c78f836e2461a3ec8 (diff)
downloadbootsplash-88e8551b2edd61408e12fdc7cf961dc23fbef8bc.tar
bootsplash-88e8551b2edd61408e12fdc7cf961dc23fbef8bc.tar.gz
bootsplash-88e8551b2edd61408e12fdc7cf961dc23fbef8bc.tar.bz2
bootsplash-88e8551b2edd61408e12fdc7cf961dc23fbef8bc.tar.xz
bootsplash-88e8551b2edd61408e12fdc7cf961dc23fbef8bc.zip
- Port to plymouth
Diffstat (limited to 'scripts/switch-themes')
-rwxr-xr-xscripts/switch-themes42
1 files changed, 9 insertions, 33 deletions
diff --git a/scripts/switch-themes b/scripts/switch-themes
index 083ea95..8c0e644 100755
--- a/scripts/switch-themes
+++ b/scripts/switch-themes
@@ -5,13 +5,13 @@
# Public License (GPL)
# $Id$
-bootsplashdir=/usr/share/bootsplash
+plymouthdir=/usr/share/plymouth
sysconfig=/etc/sysconfig/bootsplash
bootdir=/boot
function list_available_themes () {
local basename=
- for i in $bootsplashdir/themes/*;do
+ for i in $plymouthdir/themes/*;do
basename=${i##*/}
echo $basename
done
@@ -31,30 +31,6 @@ function read_link () {
perl -e '{print readlink shift, "\n"}' $1
}
-function lilo_switch_themes () {
- local theme=$1
- local message_from_theme=$bootsplashdir/themes/$theme/lilo/message
- local message_from_current=$bootdir/lilo/message
-
- #checking
- if [[ ! -f $message_from_theme ]];then
- return;
- fi
-
- #Make sure to point on lilo-graphic
- if [[ -L $bootdir/message ]];then
- point_to=$(read_link $bootdir/message)
- if [[ $point_to != message-graphic ]];then
- rm -f $bootdir/message
- ln -s message-graphic $bootdir/message
- fi
- fi
-
- if ! cmp -s $message_from_theme $message_from_current;then
- cp -f $message_from_theme $bootdir/message-graphic
- fi
-}
-
function grub_switch_themes () {
if [ -x /usr/sbin/grub-gfxmenu ]; then
/usr/sbin/grub-gfxmenu --update-theme
@@ -81,8 +57,13 @@ function update () {
rm -f /usr/share/gfxboot/themes/current
ln -s $theme /usr/share/gfxboot/themes/current
- rm -f $bootsplashdir/current
- ln -s $theme $bootsplashdir/current
+ if [[ -z $update ]]; then
+ /usr/sbin/plymouth-set-default-theme $theme
+ fi
+
+ [ -f /usr/lib/libDrakX/Xconfig/resolution_and_depth.pm ] && perl -I/usr/lib/libDrakX -MXconfig::xfree -MXconfig::resolution_and_depth -e 'Xconfig::resolution_and_depth::set_default_background(Xconfig::xfree->read->get_resolution)'
+
+
}
function switch_theme () {
@@ -111,13 +92,8 @@ function switch_theme () {
echo "THEME=$toswitch" >> $sysconfig
fi
rm -f $tmpfile
- if [[ -d /etc/bootsplash/themes/$toswitch ]]; then
- rm -f /etc/bootsplash/themes/current
- ln -s $toswitch /etc/bootsplash/themes/current
- fi
update $toswitch
fi
- #lilo_switch_themes $toswitch
grub_switch_themes $toswitch
}