updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / fbsplash / fbcondecor.daemon
blob4d78ea47b489a33e7fdb8aae52a9fae4778769ee
1 #!/bin/bash
3 # /etc/rc.d/fbcondecor
5 # Set FbConDecor backgrounds
8 . /etc/rc.conf
9 . /etc/rc.d/functions
10 . /etc/conf.d/fbcondecor
11 . /sbin/splash-functions.sh
13 splash_setup force
15 retval=0
16 [ -z "${SPLASH_TTYS%% }" ] && retval=1
17 case "$1"
18 in start )
19 if [ "${SPLASH_MODE_REQ}" != "off" ]; then
20 stat_busy "Setting FBconDecor console images"
21 for tty in ${SPLASH_TTYS}; do
22 # avoid blinking on boot
23 [[ "$( fbcondecor_ctl --tty=${tty} -c getstate )" == *\ on ]] && continue
24 fbcondecor_set_theme ${SPLASH_THEME} ${tty} || retval=1
25 done
26 if [ $retval = 0 ]; then
27 stat_done
28 else
29 stat_fail
32 ;; stop )
33 stat_busy "Disabling FBconDecor console images"
34 for tty in ${SPLASH_TTYS}; do
35 # avoid errors on restart
36 [[ "$( fbcondecor_ctl --tty=${tty} -c getstate )" == *\ off ]] && continue
37 fbcondecor_ctl --tty=${tty} -c off || retval=1
38 done
39 if [ $retval = 0 ]; then
40 stat_done
41 else
42 stat_fail
44 ;; restart )
45 $0 stop
46 sleep .1
47 echo # don't swallow our status line
48 $0 start
49 ;; * )
50 echo "usage: $0 {start|stop|restart}"
51 esac
53 exit 0
55 # EOF #