Lines 741-745
Link Here
|
741 |
done |
741 |
done |
742 |
} |
742 |
} |
743 |
|
743 |
|
|
|
744 |
initsplash() { |
745 |
[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash |
746 |
[[ -n $SPLASH ]] && splash_rc=$SPLASH |
747 |
[[ -n $THEME ]] && theme=$THEME |
748 |
[[ -x /sbin/splash.sh ]] || splash_rc=no |
749 |
if [[ -e /proc/splash ]]; then |
750 |
grep -q off /proc/splash && splash_rc=no |
751 |
else |
752 |
splash_rc=no |
753 |
fi |
754 |
splash_cfg=/etc/bootsplash/ |
755 |
|
756 |
[[ $splash_rc != "no" && $splash_rc != "No" && $splash_rc != "NO" ]] && export splash_rc=yes |
757 |
[[ -d $splash_cfg/themes ]] || splash_rc= |
758 |
if [[ $splash_rc = "yes" && -n $theme ]];then |
759 |
[[ ! -d $splash_cfg/themes/$theme ]] && theme=current |
760 |
|
761 |
res=`fbresolution` |
762 |
tmpval=$LOGO_CONSOLE |
763 |
if [ -f /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg ]; then |
764 |
function box() { true; } # ignore box descriptions in the config file |
765 |
. /etc/bootsplash/themes/$theme/config/bootsplash-$res.cfg |
766 |
fi |
767 |
|
768 |
if [[ $tmpval != "theme" ]];then |
769 |
LOGO_CONSOLE=$tmpval |
770 |
fi |
771 |
fi |
772 |
if [[ -z "$1" ]]; then |
773 |
set `/sbin/runlevel` |
774 |
runlevel=$2 |
775 |
previous=$1 |
776 |
else |
777 |
runlevel=$1 |
778 |
previous=N |
779 |
fi |
780 |
nbservices=0 |
781 |
# |
782 |
# for small dir, it is faster than echo /etc/rc$runlevel.d/* | wc -w |
783 |
# |
784 |
for i in /etc/rc$runlevel.d/* |
785 |
do |
786 |
a=$[nbservices++] |
787 |
done |
788 |
for i in /etc/rc$runlevel.d/*.rpm* |
789 |
do |
790 |
a=$[nbservices--] |
791 |
done |
792 |
a=$[nbservices++] |
793 |
# this is the number of step in rc.sysinit, could be ajusted |
794 |
[[ "$previous" = "N" ]] && nbservices=$(($nbservices+8)) && progress=7 |
795 |
PROMPT= |
796 |
export nbservices res theme progress_enable progress text_x text_y text_color text_size splash_rc LOGO_CONSOLE PROMPT |
797 |
} |
798 |
|
799 |
rc_splash() { |
800 |
[[ "$splash_rc" = "yes" ]] || return |
801 |
if [[ -n "$2" ]]; then |
802 |
progress=$2 |
803 |
else |
804 |
a=$[progress++] |
805 |
fi |
806 |
LANGUAGE=$LANGUAGE LC_ALL=$LC_CTYPE /sbin/splash.sh "$1" |
807 |
} |
808 |
|
809 |
|
744 |
# Load compatibility functions if required. |
810 |
# Load compatibility functions if required. |
745 |
[ -n "$WITHOUT_RC_COMPAT" ] || . /etc/init.d/functions-compat |
811 |
[ -n "$WITHOUT_RC_COMPAT" ] || . /etc/init.d/functions-compat |