teknoraver / rpms / systemd

Forked from rpms/systemd 4 months ago
Clone

Blame SOURCES/0178-test-explicitly-create-the-etc-init.d-directory.patch

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