From a300fee1896f631c9f8c6c48f7735ffbe76d6cbc Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Fri, 18 Oct 2024 11:18:09 -0600 Subject: [PATCH] chore: simplify Conflicts=shutdown.target (#5830) This is required by all distros which use DefaultDependencies=no. It implicitly added by all distros which do not use DefaultDependencies=no. Therefore, it does no harm to apply it in all cases. --- systemd/cloud-init-local.service.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl index 59c6df6ae41..e6a300fd4b4 100644 --- a/systemd/cloud-init-local.service.tmpl +++ b/systemd/cloud-init-local.service.tmpl @@ -11,12 +11,11 @@ Before=network-pre.target Before=shutdown.target {% if variant in ["almalinux", "cloudlinux", "rhel"] %} Before=firewalld.target -Conflicts=shutdown.target {% endif %} {% if variant in ["ubuntu", "unknown", "debian"] %} Before=sysinit.target -Conflicts=shutdown.target {% endif %} +Conflicts=shutdown.target ConditionPathExists=!/etc/cloud/cloud-init.disabled ConditionKernelCommandLine=!cloud-init=disabled ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled