pid1: also encode whether to send plymouth notifications in UnitVTable
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -2398,4 +2398,6 @@ const UnitVTable mount_vtable = {
|
||||
},
|
||||
|
||||
.can_start = mount_can_start,
|
||||
|
||||
.notify_plymouth = true,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -1687,4 +1687,6 @@ const UnitVTable swap_vtable = {
|
||||
},
|
||||
|
||||
.can_start = swap_can_start,
|
||||
|
||||
.notify_plymouth = true,
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user