]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use a dropin to override the end.service unit 22804/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 21 Mar 2022 15:10:30 +0000 (16:10 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 21 Mar 2022 15:41:49 +0000 (16:41 +0100)
instead of removing it.

test/TEST-69-SHUTDOWN/test.sh

index 39adedaea1105e3cc0cf07ec61f9d17150aaf131..c7f78fe3c9b8115a9eff68bda221eff7c8e0c691 100755 (executable)
@@ -24,7 +24,12 @@ EOF
 test_append_files() {
     local workspace="${1:?}"
     # prevent shutdown in test suite, the expect script does that manually.
-    rm "${workspace:?}/usr/lib/systemd/tests/testdata/units/end.service"
+    mkdir -p "${workspace:?}/etc/systemd/system/end.service.d"
+    cat >"$workspace/etc/systemd/system/end.service.d/99-override.conf" <<EOF
+[Service]
+ExecStart=
+ExecStart=/bin/true
+EOF
     inst /usr/bin/screen
     echo "PS1='screen\$WINDOW # '" >>"$workspace/root/.bashrc"
     echo 'startup_message off' >"$workspace/etc/screenrc"