#!/bin/sh ### BEGIN INIT INFO # Provides: plymouth # Required-Start: udev $remote_fs $all # Required-Stop: $remote_fs # Should-Start: $x-display-manager # Should-Stop: $x-display-manager # Default-Start: 2 3 4 5 # Default-Stop: 0 6 # Short-Description: Stop plymouth during boot and start it on shutdown ### END INIT INFO setglobal PATH = '"/sbin:/bin:/usr/sbin:/usr/bin'" setglobal NAME = '"plymouth'" setglobal DESC = '"Boot splash manager'" test -x /sbin/plymouthd || exit 0 if test -r "/etc/default/$(NAME)" { source "/etc/default/${NAME}" } source /lib/lsb/init-functions set -e setglobal SPLASH = '"true'" for ARGUMENT in [$[cat /proc/cmdline]] { match $(ARGUMENT) { with splash* setglobal SPLASH = '"true'" with nosplash*|plymouth.enable=0 setglobal SPLASH = '"false'" } } match $(1) { with start match $(SPLASH) { with true /bin/plymouth quit --retain-splash } with stop match $(SPLASH) { with true if ! plymouth --ping { /sbin/plymouthd --mode=shutdown } setglobal RUNLEVEL = $[/sbin/runlevel | cut -d " " -f 2] match $(RUNLEVEL) { with 0 setglobal TEXT = '"Shutting down system...'" with 6 setglobal TEXT = '"Restarting system...'" } /bin/plymouth message --text="$(TEXT)" /bin/plymouth --show-splash } with restart|force-reload with * echo "Usage: $(0) {start|stop|restart|force-reload}" > !2 exit 1 } exit 0