summaryrefslogtreecommitdiffstats
path: root/abs/core/fbsplash/fbsplash.daemon
blob: e615500806098aa6d42bebfd246c6552cde3574c (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash

source /etc/rc.conf
source /etc/rc.d/functions

source /sbin/splash-functions.sh
source /etc/conf.d/fbsplash.conf

case "$1" in
	start)
		if [ "$(fbcondecor_supported)" = "true" ]
		then
			THEME="linhes"
			if [ -f /proc/cmdline ]; then
				OPTIONS=$(grep -o 'splash=[^ ]*' /proc/cmdline)
				for i in $(echo "${OPTIONS#*=}" | sed -e 's/,/ /g')
				do
					case ${i%:*} in
						theme)		THEME=${i#*:} ;;
					esac
				done
			fi
			stat_busy "Setting fbcondecor console images"
			for TTY in ${SPLASH_TTYS}; do
				fbcondecor_set_theme ${TTY} ${THEME}
			done
			stat_done
		fi
		save_boot_steps
		splash_exit
	;;

	kill)
		if [ "$(fbcondecor_supported)" = "true" ]
		then
			stat_busy "Disabling fbcondecor console images"
			for TTY in ${SPLASH_TTYS}; do
				fbcondecor_remove_theme ${TTY}
			done
			stat_done
		fi
	;;

	restart)
		$0 kill
		sleep 1
		$1 start
	;;

	*)
		echo "usage: $0 {start|restart|kill}"
esac
exit 0

#EOF