chiark / gitweb /
systemd: show status when run with plymouth, and don't start plymouth a second time...
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Feb 2011 13:17:52 +0000 (14:17 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 9 Feb 2011 13:17:52 +0000 (14:17 +0100)
src/main.c
units/plymouth-start.service

index 0f82b706c6bd734521de11a7f4e8cdd11ea3d82b..d1eeffb12ee0b23f70d1af1686bed0e22f3e7bf1 100644 (file)
@@ -985,6 +985,11 @@ int main(int argc, char *argv[]) {
         if (parse_argv(argc, argv) < 0)
                 goto finish;
 
+        /* If Plymouth is being run make sure we show the status, so
+         * that there's something nice to see when people press Esc */
+        if (access("/dev/.systemd/plymouth", F_OK) >= 0)
+                arg_show_status = true;
+
         if (arg_action == ACTION_HELP) {
                 retval = help();
                 goto finish;
index 61cb82cde4ad3518680363fd78e9efa43d72e01f..c3c101eb8ad8e77d8ea0cb4aff42084ca85b88e3 100644 (file)
@@ -12,7 +12,13 @@ Wants=systemd-ask-password-plymouth.path
 After=systemd-vconsole-setup.service udev-settle.service
 Before=systemd-ask-password-plymouth.service
 
+# Dracut informs us with this flag file if plymouth is already running
+ConditionPathExists=!/dev/.systemd/plymouth
+
 [Service]
 ExecStart=/sbin/plymouthd --mode=boot
 ExecStartPost=-/bin/plymouth --show-splash
 Type=forking
+
+# Send SIGRTMIN+20 to systemd, i.e. enable status messages
+ExecStartPost=-/usr/bin/kill -54 1