aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/make-boot-splash
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/make-boot-splash')
-rwxr-xr-xscripts/make-boot-splash18
1 files changed, 8 insertions, 10 deletions
diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash
index ea22423..8cd83e8 100755
--- a/scripts/make-boot-splash
+++ b/scripts/make-boot-splash
@@ -11,19 +11,11 @@
[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash
[[ -z $THEME ]] && THEME=Mandrake
-initrd_file=$1
-
-[[ -z $initrd_file ]] && {
- echo "You need to specify a initrd file as argument"
- exit 1;
-}
+[ $# = 2 ] || { echo "usage: $0 <initrd> <resolution>"; exit 1; }
+initrd_file=$1
vgamode=$2
-if [[ -z $vgamode || $vgamode == auto ]];then
- vgamode=$( $splash_dir/scripts/detect-resolution $initrd_file)
-fi
-
if [[ $vgamode == 640* ]];then
resolution=640x480
elif [[ $vgamode == 800* ]];then
@@ -34,6 +26,10 @@ elif [[ $vgamode == 1280* ]];then
resolution=1280x1024
elif [[ $vgamode == 1600* ]];then
resolution=1600x1200
+else
+ echo "unknown resolution \"$vgamode\""
+ [ "$vgamode" = "auto" ] && echo 'resolution "auto" is not handled anymore'
+ exit 1
fi
if [[ -f $splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg ]];then
@@ -49,6 +45,8 @@ if [[ -z $config ]];then
exit 1;
fi
+$splash_dir/scripts/remove-splash $initrd_file
+
if [[ -x /sbin/splash ]]; then
/sbin/splash -s -f $config >> $initrd_file
fi