aboutsummaryrefslogtreecommitdiffstats
path: root/event.d
diff options
context:
space:
mode:
Diffstat (limited to 'event.d')
-rw-r--r--event.d/plymouth-shutdown24
-rw-r--r--event.d/quit-plymouth1
2 files changed, 25 insertions, 0 deletions
diff --git a/event.d/plymouth-shutdown b/event.d/plymouth-shutdown
new file mode 100644
index 00000000..d76dbd3f
--- /dev/null
+++ b/event.d/plymouth-shutdown
@@ -0,0 +1,24 @@
+# plymouth-shutdown - put up shutdown splash
+#
+# This service triggers plymouth to put up a splash
+# when leaving runlevel 5.
+
+start on stopped prefdm
+
+console output
+script
+ set $(runlevel || true)
+ if [ "$2" != "0" ] && [ "$2" != "6" ]; then
+ exit 0
+ fi
+
+ /sbin/plymouthd --mode=shutdown || exit 1
+ /bin/plymouth --sysinit
+ /bin/plymouth --show-splash
+ if [ "$2" = "0" ]; then
+ /bin/plymouth message --text="Shutting down..."
+ elif [ "$2" = "6" ]; then
+ /bin/plymouth message --text="Restarting..."
+ fi
+end script
+
diff --git a/event.d/quit-plymouth b/event.d/quit-plymouth
index 7f12c230..13ac3880 100644
--- a/event.d/quit-plymouth
+++ b/event.d/quit-plymouth
@@ -5,6 +5,7 @@
# this completes before the getty starts.
# prefdm handles quit differently, though.
+start on runlevel S
start on stopping rc2
start on stopping rc3
start on stopping rc4