diff options
Diffstat (limited to 'abs/core/fbsplash/fbsplash-basic.sh')
-rw-r--r-- | abs/core/fbsplash/fbsplash-basic.sh | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/abs/core/fbsplash/fbsplash-basic.sh b/abs/core/fbsplash/fbsplash-basic.sh index 2834060..4403b86 100644 --- a/abs/core/fbsplash/fbsplash-basic.sh +++ b/abs/core/fbsplash/fbsplash-basic.sh @@ -12,18 +12,20 @@ [[ $PREVLEVEL && $RUNLEVEL ]] || return 0 -# Do nothing if improved scripts are installed -[ -r /etc/rc.d/functions.d/fbsplash-extras.sh ] && return +# Do nothing if advanced script is installed +[[ -r /etc/rc.d/functions.d/fbsplash-extras.sh ]] && return # Only do this where needed # Since we use BASH, all important functions and variables are exported case ${0#/etc/rc.} in sysinit | multi | shutdown ) - export SPLASH_PUSH_MESSAGES="no" - export SPLASH_VERBOSE_ON_ERRORS="no" + # splash-functions.sh will run splash_setup which needs /proc + # code line copied from /etc/rc.sysinit + /bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev + export SPLASH_PUSH_MESSAGES SPLASH_VERBOSE_ON_ERRORS . /sbin/splash-functions.sh # /etc/conf.d/splash is also sourced by this unset options opt i # eliminate splash_setup non local vars ## FIX ME ## - declare -ix SPLASH_STEPS=3 # sysinit steps - declare -ix SPLASH_STEPS_DONE=0 + SPLASH_STEPS=3 # sysinit steps + SPLASH_STEPS_DONE=0 esac # Verbose mode is handled by fbcondecor kernel patch and daemon script @@ -38,8 +40,8 @@ case $0 in /etc/rc.sysinit ) # Prevent splash destruction CONSOLEFONT="" # Continue to use a splash daamon started in initcpio - if /bin/mountpoint -q /dev/.splash-cache; then - /bin/mount --move /dev/.splash-cache $spl_cachedir || return + if /bin/mountpoint -q /run/.splash-cache; then + /bin/mount --move /run/.splash-cache $spl_cachedir || return splash_comm_send set message "$SPLASH_BOOT_MESSAGE" # Mount a tmpfs else @@ -59,7 +61,7 @@ case $0 in /etc/rc.sysinit ) splash_progress } splash_sysinit_postfsck() { # fsck failure emergency exit - [ ${fsckret} -gt 1 -a ${fsckret} -ne 32 ] && chvt 1 + (( fsckret > 1 && fsckret != 32 )) && chvt 1 } splash_sysinit_end() { splash_progress @@ -108,19 +110,13 @@ case $0 in /etc/rc.sysinit ) splash_shutdown_start() { splash_begin } - ## http://bugs.archlinux.org/task/10536 ## FIX ME ## - splash_shutdown_prekillall() { /bin/sleep .1; } + splash_shutdown_prekillall() { + splash_comm_send progress $(( 65535*1/3 )); splash_comm_send paint + [[ -r $spl_pidfile ]] && add_omit_pids $( <$spl_pidfile ) + } splash_shutdown_postkillall() { - if [[ $( $spl_bindir/fgconsole ) = $SPLASH_TTY ]]; then - stat_busy "Restarting Fbsplash daemon" - PROGRESS=$(( 65535*2/3 )) splash_start - if [[ -e $spl_cachedir/stop_failed-fbsplash-dummy ]]; then - splash_comm_send update_svc fbsplash-dummy svc_stop_failed - fi - stat_done - fi + splash_comm_send progress $(( 65535*2/3 )); splash_comm_send paint } - ## splash_shutdown_poweroff() { SPLASH_EXIT_TYPE=staysilent splash_stop } @@ -131,7 +127,7 @@ splash_progress_init() { case $daemon in $SPLASH_XSERVICE | @$SPLASH_XSERVICE ) break ;; \!* |@* ) continue esac - SPLASH_STEPS+=1 + (( SPLASH_STEPS++ )) done } @@ -141,7 +137,6 @@ splash_progress() { } # Start the splash daemon - using upstream function -splash_set_event_dev() { :; } # override - Never grab the keyboard splash_begin() { if ! [[ $( /bin/pidof -o %PPID $spl_daemon ) ]]; then stat_busy "Starting Fbsplash daemon" |