# /etc/rc.d/init.d/splash-functions - splashfunctions for busybox' fbsplash with tykef patch # $Id$ [[ -f /etc/splash/splash.conf ]] && . /etc/splash/splash.conf splash() { case $1 in rc_init) rc_init ;; rc_verbose|rc_exit) rc_exit ;; esac } rc_init() { if [[ ${SPLASH_MODE} = silent ]] then local resolution="$(splash_resolution)" splash_cursor disable chvt ${SPLASH_TTY} if [[ $runlevel = boot ]] || [[ ${runlevel} = sysinit ]] then fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ -s ${SPLASH_THEMES}/${SPLASH_THEME}/startup-${resolution}.ppm.gz \ -m ${SPLASH_THEMES}/${SPLASH_THEME}/splash-font.gz \ -f ${SPLASH_FIFO} \ ${SPLASH_OPTS} & splash_control "write:${SPLASH_BOOT_MESSAGE}" fi if [[ ${runlevel} = shutdown ]] then fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ -s ${SPLASH_THEMES}/${SPLASH_THEME}/shutdown-${resolution}.ppm.gz \ -m ${SPLASH_THEMES}/${SPLASH_THEME}/splash-font.gz \ -f ${SPLASH_FIFO} \ ${SPLASH_OPTS} & splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" fi if [[ $runlevel = reboot ]] then fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ -s ${SPLASH_THEMES}/${SPLASH_THEME}/reboot-${resolution}.ppm.gz \ -m ${SPLASH_THEMES}/${SPLASH_THEME}/splash-font.gz \ -f ${SPLASH_FIFO} \ ${SPLASH_OPTS} & splash_control "write:${SPLASH_REBOOT_MESSAGE}" fi fi } rc_exit() { if [[ ${SPLASH_MODE} = silent ]] then splash_control "exit" splash_cursor enable chvt 1 fi } splash_resolution() { fbres } splash_control() { # only write to fifo if the fbsplash process is runnning # or the console will hang if [[ -n $(pidof fbsplash) ]] then echo "$@" > ${SPLASH_FIFO} fi } # disable|enable splash_cursor() { case $1 in enable) echo -e "\e[?0c";; disable) echo -e "\e[?1c" ;; esac }