ac3a84
From 0bdf4aaa0d8cdc6b2721d09fe630bf6185903a0d Mon Sep 17 00:00:00 2001
ac3a84
From: Frantisek Sumsal <frantisek@sumsal.cz>
ac3a84
Date: Thu, 12 Jan 2023 19:19:28 +0100
ac3a84
Subject: [PATCH] test: explicitly create the /etc/init.d directory
ac3a84
ac3a84
On RHEL/CentOS/Fedora this directory is provided by the chkconfig or
ac3a84
initscripts package, which might not be installed:
ac3a84
ac3a84
testsuite-26.sh[1225]: + [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]
ac3a84
testsuite-26.sh[1225]: + cat
ac3a84
testsuite-26.sh[2330]: /usr/lib/systemd/tests/testdata/units/testsuite-26.sh: line 299: /etc/init.d/issue-24990: No such file or directory
ac3a84
ac3a84
Follow-up to 5f882cc3ab32636d9242effb2cefad20d92d2ec2.
ac3a84
ac3a84
(cherry picked from commit 7fcf0fab078ed92a4f6c3c3658c0a9dfd67c9601)
ac3a84
ac3a84
Related: #2160477
ac3a84
---
ac3a84
 test/units/testsuite-26.sh | 2 +-
ac3a84
 1 file changed, 1 insertion(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/test/units/testsuite-26.sh b/test/units/testsuite-26.sh
ac3a84
index a8e7a5abaa..37ae6069bc 100755
ac3a84
--- a/test/units/testsuite-26.sh
ac3a84
+++ b/test/units/testsuite-26.sh
ac3a84
@@ -294,7 +294,7 @@ systemctl unset-environment IMPORT_THIS IMPORT_THIS_TOO
ac3a84
 
ac3a84
 # test for sysv-generator (issue #24990)
ac3a84
 if [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]; then
ac3a84
-
ac3a84
+    mkdir -p /etc/init.d
ac3a84
     # invalid dependency
ac3a84
     cat >/etc/init.d/issue-24990 <<\EOF
ac3a84
 #!/bin/bash