summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/fbsplash-runit.sh
blob: 87435ee2482c32ce3ceb23cea4ddc1291112a0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# fbsplash functions.d runit script #

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/fbcondecor ]
then
	. /etc/conf.d/fbcondecor
	. /sbin/splash-functions.sh

	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

		splash_comm_send set message "$SPLASH_BOOT_MESSAGE"

	;; /etc/runit/3 )
		( splash_cache_prep ) || return

		splash_comm_send set message "$SPLASH_SHUTDOWN_MESSAGE"
	esac
fi