# plymouth - Userspace bootsplash utility
#
# plymouth provides a boot splash screen on the system console using
# the kernel framebuffer device.  On boot, this is nominally started by
# the initramfs so the pre-start script, script and post-start script
# parts are actually not run.  These are normally run on shutdown instead.

description	"userspace bootsplash utility"

start on (runlevel [016]
      	  and (stopped xdm
	       or stopped uxlaunch))

expect fork
kill timeout 60

pre-start script
    status lightdm >/dev/null 2>/dev/null && start wait-for-state WAITER=plymouth-shutdown WAIT_FOR=lightdm TARGET_GOAL=stop WAIT_STATE=waiting || :
end script

exec /sbin/plymouthd --mode=shutdown

post-start exec /bin/plymouth show-splash

pre-stop exec /bin/plymouth quit
