Skip to content

Commit

Permalink
fix(systemd): add Before=shutdown.target to cloud-init-main.service.t…
Browse files Browse the repository at this point in the history
…mpl (#5653)

Fixes lintian warning systemd-service-file-shutdown-problems. See [1,
2].

Remove superflous conditional additions of Conflicts=shutdown.target as
it is unconditionally added for every target.

[1] https://salsa.debian.org/lintian/lintian/-/blob/2.118.0/tags/s/systemd-service-file-shutdown-problems.tag
[2] systemd/systemd#11821
  • Loading branch information
aciba90 authored Sep 4, 2024
1 parent 60a856a commit 9cc458c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions systemd/cloud-init-main.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ Requires=dbus.socket
After=dbus.socket
Before=network.service
Before=firewalld.target
Conflicts=shutdown.target
{% endif %}
{% if variant in ["ubuntu", "unknown", "debian"] %}
Before=sysinit.target
Conflicts=shutdown.target
{% endif %}

After=systemd-remount-fs.service
Before=sysinit.target
Before=cloud-init-local.service
Before=shutdown.target
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/cloud
ConditionPathExists=!/etc/cloud/cloud-init.disabled
Expand Down

0 comments on commit 9cc458c

Please sign in to comment.