[PATCH] secret: install service file only if init_script is 'systemd'

Roman Bogorodskiy posted 1 patch 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20260302191608.3804-1-bogorodskiy@gmail.com
src/secret/meson.build | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
[PATCH] secret: install service file only if init_script is 'systemd'
Posted by Roman Bogorodskiy 5 hours ago
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
---
 src/secret/meson.build | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/secret/meson.build b/src/secret/meson.build
index cfcc861f4f..32105dad9f 100644
--- a/src/secret/meson.build
+++ b/src/secret/meson.build
@@ -54,13 +54,15 @@ if conf.has('WITH_SECRETS')
 
   virt_secret_init_encryption_conf.set('localstatedir', localstatedir)
 
-  configure_file(
-    input: 'virt-secret-init-encryption.service.in',
-    output: '@0@.service'.format('virt-secret-init-encryption'),
-    configuration: virt_secret_init_encryption_conf,
-    install: true,
-    install_dir: unitdir,
-  )
+  if init_script == 'systemd'
+    configure_file(
+      input: 'virt-secret-init-encryption.service.in',
+      output: '@0@.service'.format('virt-secret-init-encryption'),
+      configuration: virt_secret_init_encryption_conf,
+      install: true,
+      install_dir: unitdir,
+    )
+  endif
 
   virt_daemon_units += {
     'service': 'virtsecretd',
-- 
2.52.0