Skip to content

Commit

Permalink
getty-checktrust: Fix dependencies
Browse files Browse the repository at this point in the history
It is not possible to use template units with directives, so

    Before=getty@.service

does not work.

There is a getty-pre.target unit which can be requested by services,
which want to be ordered before getty. Use that instead.

Although, WantedBy=getty@.service does work, this is strictly not
correct, because we want this service to run indepdendent from getty,
for example, to set the tag for lightdm. Change to
WantedBy=multi-user.target.
  • Loading branch information
donald committed Jul 4, 2023
1 parent a17298a commit 2987558
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions checktrust/getty-checktrust.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[Unit]
Before=getty@.service

[Install]
WantedBy=getty@.service
Wants=getty-pre.target
Before=getty-pre.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/getty-checktrust
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

0 comments on commit 2987558

Please sign in to comment.