summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/end.service.in (renamed from test/end.service)2
-rw-r--r--test/test-functions3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/end.service b/test/end.service.in
index 0f04dfeb20..4857ffe02b 100644
--- a/test/end.service
+++ b/test/end.service.in
@@ -3,4 +3,4 @@ Description=End the test
After=testsuite.service
[Service]
-ExecStart=/usr/bin/systemctl poweroff --no-block
+ExecStart=@SYSTEMCTL@ poweroff --no-block
diff --git a/test/test-functions b/test/test-functions
index a0f1bf4eb2..42c954d565 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -293,7 +293,8 @@ install_terminfo() {
}
setup_testsuite() {
- cp $TEST_BASE_DIR/{testsuite.target,end.service} $initdir/etc/systemd/system/
+ cp $TEST_BASE_DIR/testsuite.target $initdir/etc/systemd/system/
+ sed "s#@SYSTEMCTL@#$(type -P systemctl)#g" $TEST_BASE_DIR/end.service.in > $initdir/etc/systemd/system/end.service
mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
ln -fs $TEST_BASE_DIR/testsuite.service $initdir/etc/systemd/system/testsuite.target.wants/testsuite.service