summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/fbsplash-runit.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2011-10-06 22:02:37 (GMT)
committerBritney Fransen <brfransen@gmail.com>2011-10-06 22:02:37 (GMT)
commitfc7b12c545c7ecf66df1e7113f59dcf2fea0c2de (patch)
treedf08404833f54370bae5f2a6f5aa6d3583208963 /abs/core/runit-scripts/fbsplash-runit.sh
parent81f6e0d44f1f03250fbda0217bfaba88fe55ac3f (diff)
downloadlinhes_pkgbuild-fc7b12c545c7ecf66df1e7113f59dcf2fea0c2de.zip
linhes_pkgbuild-fc7b12c545c7ecf66df1e7113f59dcf2fea0c2de.tar.gz
linhes_pkgbuild-fc7b12c545c7ecf66df1e7113f59dcf2fea0c2de.tar.bz2
runit-scripts: fbsplash-runit.sh: update for new fbsplash
Diffstat (limited to 'abs/core/runit-scripts/fbsplash-runit.sh')
-rwxr-xr-xabs/core/runit-scripts/fbsplash-runit.sh55
1 files changed, 24 insertions, 31 deletions
diff --git a/abs/core/runit-scripts/fbsplash-runit.sh b/abs/core/runit-scripts/fbsplash-runit.sh
index a9432d0..87435ee 100755
--- a/abs/core/runit-scripts/fbsplash-runit.sh
+++ b/abs/core/runit-scripts/fbsplash-runit.sh
@@ -1,44 +1,37 @@
-# fbsplash function.d script #
-# Author: Greg Helton <gt@fallendusk.org> #
+# fbsplash functions.d runit script #
-# Who is calling? #
-CALLER=$0
printhlr() {
printf "${C_OTHER}${PREFIX_REG} ${C_H1}${1}${C_CLEAR} \n"
}
+stat_runit(){
+ printf ""
+ printhlr "${C_MAIN}${1}${C_CLEAR} "
+}
+
+
# splash stuff #
-if [ -e /etc/conf.d/fbsplash.conf ]
+if [ -e /etc/conf.d/fbcondecor ]
then
- . /etc/conf.d/fbsplash.conf
+ . /etc/conf.d/fbcondecor
. /sbin/splash-functions.sh
-# Redefine the stat functions #
-
- stat_runit() {
- # printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
- # printf "${SAVE_POSITION}"
- # deltext
- # printf " ${C_OTHER}[${C_BUSY}BKGD${C_OTHER}]${C_CLEAR} "a
-
- printf ""
- printhlr "${C_MAIN}${1}${C_CLEAR} "
-
- # Load variables #
+ case $0 in /etc/runit/1 )
+ # Prevent splash destruction
+ CONSOLEFONT=""
+ # Continue to use a splash daemon started in initcpio
+ if /bin/mountpoint -q /run/.splash-cache; then
+ /bin/mount --move /run/.splash-cache $spl_cachedir || return
+ # Mount a tmpfs
+ else
+ ( splash_cache_prep ) || return
+ fi
- var_load STEP_NR MAX_STEPS RC_MULTI RC_SYSINIT RC_SHUTDOWN
- # Only update the splash progress if we're in sysinit, multi, or shutdown. #
+ splash_comm_send set message "$SPLASH_BOOT_MESSAGE"
- ((SPLASH_STEP_NR++))
- SPLASH_PROGRESS=$((100*${SPLASH_STEP_NR}/${SPLASH_MAX_STEPS}))
- SPLASH_CURRENT_PROGRESS=${SPLASH_PROGRESS}
- splash_update_progress ${SPLASH_PROGRESS}
- var_save STEP_NR CURRENT_PROGRESS
+ ;; /etc/runit/3 )
+ ( splash_cache_prep ) || return
- }
-else
- stat_runit(){
- printf ""
- printhlr "${C_MAIN}${1}${C_CLEAR} "
- }
+ splash_comm_send set message "$SPLASH_SHUTDOWN_MESSAGE"
+ esac
fi