The problems solved themselves. I don't know why but now it works
all fine.

ii  bootsplash     3.1-17         Enables a graphical boot screen
ii  bootsplash-the 0.5-6          The bootsplash theme debian
ii  console-setup  1.7            Setup the font and the keyboard on the
conso
ii  console-termin 4.20-2         Fixed-width fonts for fast reading on
the Li

But there is another problem with the init script. There exists only a
check for special configuration files for the specific ttys
(vtsplash-TTY-RESOLUTION.cfg) but no one for none existing standard
configuration file (bootsplash-RESOLUTION.cfg). My framebuffer has a
resolution of 1280x1024 but the default theme (bootsplash-theme-debian)
has only one configuration for 1024x768 pixels, namely
bootsplash-1024x768.cfg. So, everytime the script is executed, i get,
correctly,  an error message that the file 'bootsplash-1280x1024.cfg'
doesn't exists. I've added a corrected init script with some other
changes, which should correct this behaviour.


best regards
Benjamin Leipold

#!/bin/sh
### BEGIN INIT INFO
# Provides:       bootsplash
# Required-Start: $remote_fs
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Boot Splash screen setup
### END INIT INFO

# based on initscript from gentoo linux
# made some changes to fit normal sysvinit like used by debian
# everything in here is GPL ;)
# [EMAIL PROTECTED]

SCRIPTNAME='/etc/init.d/bootsplash'

# Only do this if the kernel has support
[ -r /proc/splash ] || exit 0
# Only do this if 'splash' exists
SPLASH=$(which splash) || exit 0
# Only do this if 'fbresolution' exists
FBRES=$(which fbresolution) || exit 0

# source our config
[ -r /etc/default/bootsplash ] && . /etc/default/bootsplash

# source rcS configuration variables
[ -r /etc/default/rcS ] && . /etc/default/rcS

. /lib/lsb/init-functions

# default settings
THEME="${THEME:-current}"
BOOTSPLASH_TTYS="${BOOTSPLASH_TTYS:-$(seq 0 5)}"

get_bootsplash_theme () {
        # try to get bootsplash theme from kernel command line
        CMDLINE=$(cat /proc/cmdline)

        ( echo $CMDLINE | grep -qe 'theme=.*' ) || return 1
        
        for param in $CMDLINE; do
                if [ "${param%=*}" = "theme" ]; then
                        THEME="${param#theme=}"
                        return 0
                fi
        done
        
        return 1
}

set_bootsplash_image () {

    TTY="$1"
    
    [ -z "$TTY" ] && return 1

    # get console resolution
    RESOLUTION=$($FBRES)
    
    # support for a different config per virtual terminal
    if [ -r 
/etc/bootsplash/themes/${THEME}/config/vtsplash-${TTY}-${RESOLUTION}.cfg ]
    then
        $SPLASH -s -u $TTY -n 
/etc/bootsplash/themes/${THEME}/config/vtsplash-${TTY}-${RESOLUTION}.cfg
        return 0
    elif [ -r  
/etc/bootsplash/themes/${THEME}/config/bootsplash-${RESOLUTION}.cfg ]
    then
        $SPLASH -s -u $TTY -n 
/etc/bootsplash/themes/${THEME}/config/bootsplash-${RESOLUTION}.cfg
        return 0
    fi

    return 1
}

case "$1" in
    start)
        log_action_begin_msg "Setting Console frame buffer images"
        get_bootsplash_theme
        log_action_cont_msg "using theme '$THEME'"

        # switch to a usable image on all consoles
        for TTY in $(echo "${BOOTSPLASH_TTYS}" | sed -e 's# #\n#g')
        do
            set_bootsplash_image $TTY
        done
                
        log_action_end_msg 0
    ;;
    
    stop)
        # Stop doesn't really stop, it actually changes the image
        # on vt1 back to the bootsplash image.

        CHVT_EXISTS='yes'
        CHVT=$(which chvt) || CHVT_EXISTS='no'

        log_action_begin_msg "Setting Console frame buffer images"
        get_bootsplash_theme
        log_action_cont_msg "using theme '$THEME'"

        set_bootsplash_image 0

        # ensure "silent" image is displayed
        echo "silent" > /proc/splash

        # switch to vt1 (must be &'d otherwise script hangs)
        [ "$CHVT_EXISTS" = 'yes' ] && ${CHVT} 1 &

        # print a nice message
        # /sbin/fbtruetype ........

        log_action_end_msg 0
    ;;

    restart|force-reload)
        :
    ;;

    *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-restart}" >&2
        exit 3
    ;;
esac

:

Reply via email to