mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
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.
This commit is contained in:
parent
dcb17e3295
commit
4114b723f9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user