From 4114b723f965ed19c8cf56be130a91f6abc99ea9 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 24 Apr 2024 14:44:27 +0100 Subject: [PATCH] TEST-26-SYSTEMCTL: Create /etc/init.d if needed OpenSUSE doesn't disable sysv compat but also may not have anything in /etc/init.d. --- test/units/testsuite-26.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/units/testsuite-26.sh b/test/units/testsuite-26.sh index 6734aee654f..27aa98edb78 100755 --- a/test/units/testsuite-26.sh +++ b/test/units/testsuite-26.sh @@ -386,6 +386,10 @@ if [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]; then # at runtime, so let's just support the two most common paths for now. [[ -d /etc/rc.d/init.d ]] && SYSVINIT_PATH="/etc/rc.d/init.d" || SYSVINIT_PATH="/etc/init.d" + # OpenSUSE leaves sysvinit-path enabled, which means systemd-sysv-generator is built + # but may not create the directory if there's no services that use it. + mkdir -p "$SYSVINIT_PATH" + # invalid dependency cat >"${SYSVINIT_PATH:?}/issue-24990" <<\EOF #!/bin/bash -- 2.47.3