d161705
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d161705
From: Christian Glombek <cglombek@redhat.com>
d161705
Date: Wed, 9 Aug 2023 18:11:25 +0200
d161705
Subject: [PATCH] Add [Install] section to aux systemd units
d161705
d161705
Currently in Fedora, these services are statically enabled by symlinks,
d161705
with no other way to disable them than to manually delete those symlinks.
d161705
This is problematic in Fedora IoT, where grub-boot-success.timer is
d161705
not supposed to be enabled.
d161705
d161705
This change adds `[Install]` sections to all systemd units that are
d161705
currently enabled statically, so that they can be enabled dynamically
d161705
via presets or manually instead.
d161705
---
d161705
 docs/grub-boot-indeterminate.service             | 3 +++
d161705
 docs/grub-boot-success.timer                     | 3 +++
d161705
 util/systemd/grub-systemd-integration.service.in | 3 +++
d161705
 3 files changed, 9 insertions(+)
d161705
d161705
diff --git a/docs/grub-boot-indeterminate.service b/docs/grub-boot-indeterminate.service
d161705
index 6c8dcb186b63..5bcb474a3d31 100644
d161705
--- a/docs/grub-boot-indeterminate.service
d161705
+++ b/docs/grub-boot-indeterminate.service
d161705
@@ -9,3 +9,6 @@ Before=system-update-pre.target
d161705
 [Service]
d161705
 Type=oneshot
d161705
 ExecStart=/usr/bin/grub2-editenv - incr boot_indeterminate
d161705
+
d161705
+[Install]
d161705
+WantedBy=system-update.target
d161705
diff --git a/docs/grub-boot-success.timer b/docs/grub-boot-success.timer
d161705
index 406f17200560..1d124cccc146 100644
d161705
--- a/docs/grub-boot-success.timer
d161705
+++ b/docs/grub-boot-success.timer
d161705
@@ -5,3 +5,6 @@ ConditionVirtualization=!container
d161705
 
d161705
 [Timer]
d161705
 OnActiveSec=2min
d161705
+
d161705
+[Install]
d161705
+WantedBy=timers.target
d161705
diff --git a/util/systemd/grub-systemd-integration.service.in b/util/systemd/grub-systemd-integration.service.in
d161705
index c81fb594ce17..22ca1ca4885e 100644
d161705
--- a/util/systemd/grub-systemd-integration.service.in
d161705
+++ b/util/systemd/grub-systemd-integration.service.in
d161705
@@ -6,3 +6,6 @@ ConditionPathExists=/run/systemd/reboot-to-boot-loader-menu
d161705
 
d161705
 [Service]
d161705
 ExecStart=@libexecdir@/@grubdirname@/systemd-integration.sh
d161705
+
d161705
+[Install]
d161705
+WantedBy=reboot.target