summaryrefslogtreecommitdiffstats
path: root/src/core/job.c
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2024-04-16 16:33:09 +0200
committerLuca Boccassi <bluca@debian.org>2024-04-17 19:19:27 +0200
commitb3f548615f529203c5efbc1ebdacbc6134d0da71 (patch)
tree9f4c5d2bc109a7cce9ae7d66d6aaea7545144dc4 /src/core/job.c
parentmanager: serialize current objective (diff)
downloadsystemd-b3f548615f529203c5efbc1ebdacbc6134d0da71.tar.xz
systemd-b3f548615f529203c5efbc1ebdacbc6134d0da71.zip
core: rename SoftRebootStartTimestamp -> ShutdownStartTimestamp and generalize
Follow-up for 54f86b86ba8168faccbfc2ad16ceeccefde98a51
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 595fbce93a..c6b48035a7 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -1387,10 +1387,13 @@ void job_shutdown_magic(Job *j) {
if (j->type != JOB_START)
return;
- if (!MANAGER_IS_SYSTEM(j->unit->manager))
+ if (!unit_has_name(j->unit, SPECIAL_SHUTDOWN_TARGET))
return;
- if (!unit_has_name(j->unit, SPECIAL_SHUTDOWN_TARGET))
+ /* This is the very beginning of the shutdown phase, so take the timestamp here */
+ dual_timestamp_now(ASSERT_PTR(j->manager)->timestamps + MANAGER_TIMESTAMP_SHUTDOWN_START);
+
+ if (!MANAGER_IS_SYSTEM(j->manager))
return;
/* In case messages on console has been disabled on boot */