]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: also encode whether to send plymouth notifications in UnitVTable
authorLennart Poettering <lennart@poettering.net>
Fri, 30 Jun 2023 13:35:49 +0000 (15:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Jun 2023 20:01:02 +0000 (22:01 +0200)
src/core/manager.c
src/core/mount.c
src/core/service.c
src/core/swap.c
src/core/unit.h

index 21d2e092fa18d9d0ed7cd88ff82b78f4a2a33a5b..35b90e215945b0aea85578ba356b9ae2d5af7c7d 100644 (file)
@@ -3386,7 +3386,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
         if (detect_container() > 0)
                 return;
 
-        if (!IN_SET(u->type, UNIT_SERVICE, UNIT_MOUNT, UNIT_SWAP))
+        if (!UNIT_VTABLE(u)->notify_plymouth)
                 return;
 
         /* We set SOCK_NONBLOCK here so that we rather drop the
index 542c39e186365fa009b3f8e0eece8fae15d12851..1424ad2bf474aea8752dab3b11d5f1e04c3f848d 100644 (file)
@@ -2398,4 +2398,6 @@ const UnitVTable mount_vtable = {
         },
 
         .can_start = mount_can_start,
+
+        .notify_plymouth = true,
 };
index 3f27e28a7d72f0325bba290a3557063bc3e2ccf5..93545a252ab2adf741ea9f53a114dbf9b6df3efc 100644 (file)
@@ -5168,6 +5168,8 @@ const UnitVTable service_vtable = {
 
         .can_start = service_can_start,
 
+        .notify_plymouth = true,
+
         .audit_start_message_type = AUDIT_SERVICE_START,
         .audit_stop_message_type = AUDIT_SERVICE_STOP,
 };
index a57176b1a39f6d8ecc88c3a89bf0575ddd182f4b..73cf320bfd22062ad9e37e93e9075ea02c4c95c7 100644 (file)
@@ -1687,4 +1687,6 @@ const UnitVTable swap_vtable = {
         },
 
         .can_start = swap_can_start,
+
+        .notify_plymouth = true,
 };
index 20b00799b7493e704b68ee648ed928c4ab6658f7..3a7330c24ff954c507dc635c8a210407ae2af769 100644 (file)
@@ -783,6 +783,9 @@ typedef struct UnitVTable {
         /* True if systemd-oomd can monitor and act on this unit's recursive children's cgroups  */
         bool can_set_managed_oom;
 
+        /* If true, we'll notify plymouth about this unit */
+        bool notify_plymouth;
+
         /* The audit events to generate on start + stop (or 0 if none shall be generated) */
         int audit_start_message_type;
         int audit_stop_message_type;