From 0b060fcb268275e6b6f245b8232a903571cd36f5 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Thu, 31 Jul 2003 14:31:43 +0000 Subject: new bootsplash v3 include various scripts and binaries from bootsplash.org --- scripts/make-boot-splash | 68 ++++++------------------------------------------ 1 file changed, 8 insertions(+), 60 deletions(-) (limited to 'scripts/make-boot-splash') diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash index d46a338..df0de03 100755 --- a/scripts/make-boot-splash +++ b/scripts/make-boot-splash @@ -36,73 +36,21 @@ elif [[ $vgamode == 1600* ]];then resolution=1600x1200 fi -if [[ -f $splash_dir/themes/$THEME/images/bootsplash-$resolution.jpg && -f $splash_cfg/themes/$THEME/cfg/bootsplash-$resolution.cfg ]];then - image=$splash_dir/themes/$THEME/images/bootsplash-$resolution.jpg - config=$splash_cfg/themes/$THEME/cfg/bootsplash-$resolution.cfg +if [[ -f $splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg ]];then + config=$splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg fi if [[ -f $splash_dir/themes/$THEME/lilo/message ]];then cp -f $splash_dir/themes/$THEME/lilo/message /boot/message-graphic fi -if [[ -n $image ]];then - if [[ -z $config ]];then - echo "Can't find a config files for resolution $resolution"; - exit 1; - fi -else #no image - echo "Can't find images for resolution $resolution"; - exit 1 +if [[ -z $config ]];then + echo "Can't find a config files for resolution $resolution"; + exit 1; fi -# From SuSe mk_initrd script -function out_byte() -{ - let x=$1 - echo -en "`printf \\\\%o $x`" -} - -function write_int() -{ - let tmp1=$[$1 & 255] - let tmp2=$[$1>>8] - let tmp2=$[$tmp2&255] - let tmp3=$[$1>>16] - let tmp3=$[$tmp3&255] - let tmp4=$[$1>>24] - let tmp4=$[$tmp4&255] - out_byte $tmp1 - out_byte $tmp2 - out_byte $tmp3 - out_byte $tmp4 -} -function write_short() -{ - let tmp1=$[$1>>8] - let tmp2=$[$1&0xff] - out_byte $tmp2 - out_byte $tmp1 -} - -function write_header() -{ - # write signature - echo -n "BOOTSPL1" - # write text x coordinate - write_short $1 - # write text y coordinate - write_short $2 - # write text width - write_short $3 - # write text height - write_short $4 - # write file length - write_int $5 -} - -source $config -size=`wc -c<$image` -write_header $tx $ty $tw $th $size >> $initrd_file -cat $image >> $initrd_file +if [[ -x /sbin/splash ]]; then + /sbin/splash -s -f $config >> $initrd_file +fi $splash_dir/scripts/switch-themes -u -- cgit v1.2.1