# /etc/rc.d/init.d/splash-functions - splash-functions for plymouth # $Id$ _plymouth=/usr/bin/plymouth _plymouthd=/usr/sbin/plymouthd _pidfile=/run/plymouth/pid _udevadm=/usr/bin/udevadm splash() { # proc must be mounted too [[ ! -e /proc/cmdline ]] && return 0 if grep plymouth.enable=0 /proc/cmdline &> /dev/null then rc_echo "User requested to disable plymouth via cmdline" return 0 fi case $1 in rc_init) rc_init ;; rc_exit) rc_exit ;; rc_verbose) ;; svc_started) svc_update "$2" ;; svc_stopped) svc_update "$2" ;; esac } svc_update() { if [ -x ${_plymouth} ] then ${_plymouth} --ping && ${_plymouth} --update="$1" # ${_plymouth} --ping && ${_plymouth} message --text="$1" fi } rc_init() { if [[ ${runlevel} = boot ]] || [[ ${runlevel} = sysinit ]] then if [ -x ${_plymouthd} ] then ${_plymouthd} --mode=boot --pidfile=${_pidfile} --attach-to-session fi if [ -x ${_udevadm} ] then ${_udevadm} trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty ${_udevadm} settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ${_udevadm} settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev fi if [ -x ${_plymouth} ] then ${_plymouth} show-splash fi fi if [[ ${runlevel} = shutdown ]] || [[ ${runlevel} = reboot ]] then if [ -x ${_plymouthd} ] then ${_plymouthd} --mode=shutdown --pidfile=${_pidfile} --attach-to-session fi if [ -x ${_plymouth} ] then ${_plymouth} show-splash fi fi } rc_exit() { if [ -x ${_plymouth} ] then # update rootfs data ${_plymouth} update-root-fs --read-write # and quit ${_plymouth} quit fi }