#!/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 setvar PATH = ""/sbin:/bin:/usr/sbin:/usr/bin"" setvar NAME = ""plymouth"" setvar 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 setvar SPLASH = ""true"" for ARGUMENT in [$(cat /proc/cmdline)] { match ${ARGUMENT} { with splash* setvar SPLASH = ""true"" with nosplash*|plymouth.enable=0 setvar 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 } setvar RUNLEVEL = "$(/sbin/runlevel | cut -d " " -f 2)" match ${RUNLEVEL} { with 0 setvar TEXT = ""Shutting down system..."" with 6 setvar 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