shared/dropin: support -.service.d/ top level drop-in for service units

Closes #12830
This commit is contained in:
Anita Zhang
2019-10-15 11:14:54 -07:00
parent f18f809c07
commit d272467882
7 changed files with 70 additions and 3 deletions
+13
View File
@@ -101,6 +101,19 @@ test_basic_dropins () {
check_ok b Wants c.service
systemctl stop a c
echo "*** test -.service.d/ top level drop-in"
create_services a b
check_ko a ExecCondition "/bin/echo a"
check_ko b ExecCondition "/bin/echo b"
mkdir -p /usr/lib/systemd/system/-.service.d
cat >/usr/lib/systemd/system/-.service.d/override.conf <<EOF
[Service]
ExecCondition=/bin/echo %n
EOF
check_ok a ExecCondition "/bin/echo a"
check_ok b ExecCondition "/bin/echo b"
rm -rf /usr/lib/systemd/system/-.service.d
clear_services a b c
}