diff -ur service-0.5.7.orig/rc.d/init.d/functions service-0.5.7/rc.d/init.d/functions --- service-0.5.7.orig/rc.d/init.d/functions 2005-03-09 16:24:48 +0300 +++ service-0.5.7/rc.d/init.d/functions 2005-03-17 17:49:18 +0300 @@ -741,5 +741,71 @@ done } +initsplash() { + [[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash + [[ -n $SPLASH ]] && splash_rc=$SPLASH + [[ -n $THEME ]] && theme=$THEME + [[ -x /sbin/splash.sh ]] || splash_rc=no + if [[ -e /proc/splash ]]; then + grep -q off /proc/splash && splash_rc=no + else + splash_rc=no + fi + splash_cfg=/etc/bootsplash/ + + [[ $splash_rc != "no" && $splash_rc != "No" && $splash_rc != "NO" ]] && export splash_rc=yes + [[ -d $splash_cfg/themes ]] || splash_rc= + if [[ $splash_rc = "yes" && -n $theme ]];then + [[ ! -d $splash_cfg/themes/$theme ]] && theme=current + + res=`fbresolution` + tmpval=$LOGO_CONSOLE + if [ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]; then + function box() { true; } # ignore box descriptions in the config file + . /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg + fi + + if [[ $tmpval != "theme" ]];then + LOGO_CONSOLE=$tmpval + fi + fi + if [[ -z "$1" ]]; then + set `/sbin/runlevel` + runlevel=$2 + previous=$1 + else + runlevel=$1 + previous=N + fi + nbservices=0 + # + # for small dir, it is faster than echo /etc/rc$runlevel.d/* | wc -w + # + for i in /etc/rc$runlevel.d/* + do + a=$[nbservices++] + done + for i in /etc/rc$runlevel.d/*.rpm* + do + a=$[nbservices--] + done + a=$[nbservices++] + # this is the number of step in rc.sysinit, could be ajusted + [[ "$previous" = "N" ]] && nbservices=$(($nbservices+8)) && progress=7 + PROMPT= + export nbservices res theme progress_enable progress text_x text_y text_color text_size splash_rc LOGO_CONSOLE PROMPT +} + +rc_splash() { + [[ "$splash_rc" = "yes" ]] || return + if [[ -n "$2" ]]; then + progress=$2 + else + a=$[progress++] + fi + LANGUAGE=$LANGUAGE LC_ALL=$LC_CTYPE /sbin/splash.sh "$1" +} + + # Load compatibility functions if required. [ -n "$WITHOUT_RC_COMPAT" ] || . /etc/init.d/functions-compat