From 19f4f86bfed21c5326ed2acebe1163f3a83e832b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:25:50 +0200 Subject: Adding upstream version 241. Signed-off-by: Daniel Baumann --- test/TEST-15-DROPIN/Makefile | 1 + test/TEST-15-DROPIN/test-dropin.sh | 284 ++++++++++++++++++++++++++++++++++ test/TEST-15-DROPIN/test.sh | 34 ++++ test/TEST-15-DROPIN/testsuite.service | 6 + 4 files changed, 325 insertions(+) create mode 120000 test/TEST-15-DROPIN/Makefile create mode 100755 test/TEST-15-DROPIN/test-dropin.sh create mode 100755 test/TEST-15-DROPIN/test.sh create mode 100644 test/TEST-15-DROPIN/testsuite.service (limited to 'test/TEST-15-DROPIN') diff --git a/test/TEST-15-DROPIN/Makefile b/test/TEST-15-DROPIN/Makefile new file mode 120000 index 0000000..e9f93b1 --- /dev/null +++ b/test/TEST-15-DROPIN/Makefile @@ -0,0 +1 @@ +../TEST-01-BASIC/Makefile \ No newline at end of file diff --git a/test/TEST-15-DROPIN/test-dropin.sh b/test/TEST-15-DROPIN/test-dropin.sh new file mode 100755 index 0000000..ab0a58c --- /dev/null +++ b/test/TEST-15-DROPIN/test-dropin.sh @@ -0,0 +1,284 @@ +#! /bin/bash + +set -e +set -x + +_clear_service () { + systemctl stop $1.service 2>/dev/null || : + rm -f /{etc,run,usr/lib}/systemd/system/$1.service + rm -fr /{etc,run,usr/lib}/systemd/system/$1.service.d + rm -fr /{etc,run,usr/lib}/systemd/system/$1.service.{wants,requires} +} + +clear_services () { + for u in $*; do + _clear_service $u + done + systemctl daemon-reload +} + +create_service () { + clear_services $1 + + cat >/etc/systemd/system/$1.service</usr/lib/systemd/system/a.service.d/override.conf </usr/lib/systemd/system/a.service.d/wants-b.conf<