diff options
author | Det | 2015-07-09 13:49:27 +0300 |
---|---|---|
committer | Det | 2015-07-09 13:49:27 +0300 |
commit | b6fe689ea31f215368d1f2a880b4becbb85e3e00 (patch) | |
tree | f4e642e7adbedc3e13ca1bd8c2546e2790898137 /fbcondecor.daemon | |
download | aur-b6fe689ea31f215368d1f2a880b4becbb85e3e00.tar.gz |
Initial import: 1.5.4.4-16
Diffstat (limited to 'fbcondecor.daemon')
-rw-r--r-- | fbcondecor.daemon | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/fbcondecor.daemon b/fbcondecor.daemon new file mode 100644 index 000000000000..882c05fa835d --- /dev/null +++ b/fbcondecor.daemon @@ -0,0 +1,55 @@ +#!/bin/bash + +# /etc/rc.d/fbcondecor + +# Set FbConDecor backgrounds +# + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/fbcondecor +. /usr/bin/splash-functions.sh + +splash_setup force + +retval=0 +[ -z "${SPLASH_TTYS%% }" ] && retval=1 +case "$1" +in start ) + if [ "${SPLASH_MODE_REQ}" != "off" ]; then + stat_busy "Setting FBconDecor console images" + for tty in ${SPLASH_TTYS}; do + # avoid blinking on boot + [[ "$( fbcondecor_ctl --tty=${tty} -c getstate )" == *\ on ]] && continue + fbcondecor_set_theme ${SPLASH_THEME} ${tty} || retval=1 + done + if [ $retval = 0 ]; then + stat_done + else + stat_fail + fi + fi +;; stop ) + stat_busy "Disabling FBconDecor console images" + for tty in ${SPLASH_TTYS}; do + # avoid errors on restart + [[ "$( fbcondecor_ctl --tty=${tty} -c getstate )" == *\ off ]] && continue + fbcondecor_ctl --tty=${tty} -c off || retval=1 + done + if [ $retval = 0 ]; then + stat_done + else + stat_fail + fi +;; restart ) + $0 stop + sleep .1 + echo # don't swallow our status line + $0 start +;; * ) + echo "usage: $0 {start|stop|restart}" +esac + +exit 0 + +# EOF # |