--- trunk/busybox/splash-functions.rc 2011/02/04 21:34:23 1277 +++ trunk/busybox/splash-functions.rc 2011/02/06 22:32:23 1279 @@ -5,8 +5,33 @@ splash() { + local cmd + local args + + # check for a framebuffer console first! + [[ ! -e /dev/fb0 ]] && return 0 + # proc must be mounted too + [[ ! -e /proc/cmdline ]] && return 0 # only run fbsplash if theme was found [[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return + # and run only if a config for the current resolution exist + [[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME}/$(splash_resolution).conf ]] && return + + # check cmdline for config_opts + # splash=silent,theme:mcore + for cmd in $(< /proc/cmdline) + do + case "${cmd}" in + splash=*) + # split the cmd and put everything into an array + args=( $(echo "${cmd}" | sed 's:[,\:=]:\ :g') ) + # mode is always args[1] + SPLASH_MODE="${args[1]}" + # theme is always args[3] + SPLASH_THEME="${args[3]}" + ;; + esac + done case $1 in rc_init) rc_init ;;