aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile2
-rw-r--r--scripts/bootsplash.sysconfig4
-rw-r--r--scripts/splash.sh2
-rwxr-xr-xscripts/switch-themes40
4 files changed, 35 insertions, 13 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 9c86f0f..c82b9db 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,5 +1,5 @@
PL=detect-resolution
-SH=make-boot-splash rewritejpeg switch-themes
+SH=make-boot-splash rewritejpeg switch-themes remove-theme
SBIN=splash.sh
SYS=bootsplash.sysconfig
diff --git a/scripts/bootsplash.sysconfig b/scripts/bootsplash.sysconfig
index 0217535..4a61577 100644
--- a/scripts/bootsplash.sysconfig
+++ b/scripts/bootsplash.sysconfig
@@ -8,11 +8,11 @@
#
# SPLASH=INT When Integer could be 800x600 1024x768 1280x1024 1600x1200
#
-SPLASH=auto
+SPLASH=no
# Choose the themes. The should be based in
# /usr/share/bootsplash/themes/
-THEME=Mandrake
+THEME=
# Say yes here if you want to leave the logo on the console.
# Three options :
diff --git a/scripts/splash.sh b/scripts/splash.sh
index 5bb4bb4..d200b12 100644
--- a/scripts/splash.sh
+++ b/scripts/splash.sh
@@ -184,7 +184,7 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
_boot=$TEXT
if [ "$text_x" != "" -a "$text_y" != "" \
-a "$text_color" != "" -a "$text_size" != "" -a "$_silent" == "yes" ]; then
- gprintf "Press F2 for verbose mode."
+ gprintf "Press Esc for verbose mode."
fbtruetype.static -x $text_x -y $text_y -t $text_color -s $text_size \
$custom_font "$_boot $TEXT"
fi
diff --git a/scripts/switch-themes b/scripts/switch-themes
index 3492e09..273044c 100755
--- a/scripts/switch-themes
+++ b/scripts/switch-themes
@@ -40,23 +40,22 @@ function lilo_switch_themes () {
if [[ ! -f $message_from_theme ]];then
return;
fi
- if [[ ! -e $bootdir/lilo ]];then
+ if [[ ! -e $bootdir/message ]];then
return;
fi
#Make sure to point on lilo-graphic
- if [[ -L $bootdir/lilo ]];then
- point_to=$(read_link $bootdir/lilo)
+ if [[ -L $bootdir/message ]];then
+ point_to=$(read_link $bootdir/message)
if [[ $point_to != lilo-graphic ]];then
- rm -f $bootdir/lilo
- ln -s lilo-graphic $bootdir/lilo
+ rm -f $bootdir/message
+ ln -s lilo-graphic $bootdir/message
fi
fi
if ! cmp -s $message_from_theme $message_from_current;then
cp -f $message_from_theme $message_from_current
fi
-
}
function check_it () {
@@ -89,6 +88,11 @@ function switch_theme () {
tmpfile=$(mktemp /tmp/.bootsplash.XXXXXXX)
cp -f $sysconfig $tmpfile && rm -f $sysconfig
while read line;do
+ if [[ $line == SPLASH=* ]];then
+ echo "SPLASH=auto" >> $sysconfig
+ ok=yes
+ continue;
+ fi
if [[ $line == THEME=* ]];then
echo "THEME=$toswitch" >> $sysconfig
ok=yes
@@ -100,13 +104,30 @@ function switch_theme () {
echo "THEME=$toswitch" >> $sysconfig
fi
rm -f $tmpfile
- if [[ -d /etc/bootsplash/$toswitch ]]; then
- rm -f /etc/bootsplash/current
- ln -s /etc/bootsplash/$toswitch current
+ if [[ -d /etc/bootsplash/themes/$toswitch ]]; then
+ rm -f /etc/bootsplash/themes/current
+ ln -s /etc/bootsplash/themes/$toswitch current
fi
fi
}
+function update_boot () {
+ pushd /boot &> /dev/null
+ if [[ -x /usr/share/loader/make-initrd ]]; then
+ /usr/share/loader/make-initrd -n &> /dev/null
+ if [[ -x /usr/sbin/detectloader ]]; then
+ LOADER=$(/usr/sbin/detectloader -q)
+ if [[ $LOADER = "LILO" ]] && [[ -x /sbin/lilo ]];then
+ /sbin/lilo >/dev/null 2>/dev/null
+ fi
+ if [[ $LOADER = "YABOOT" ]] && [[ -x /sbin/ybin ]];then
+ /sbin/ybin >/dev/null 2>/dev/null
+ fi
+ fi
+ fi
+ popd &> /dev/null
+}
+
function usage () {
basename=`basename $0`
cat <<EOF
@@ -154,3 +175,4 @@ fi
check_it $theme
switch_theme $theme
+update_boot