diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | test/end.service.in (renamed from test/end.service) | 2 | ||||
-rw-r--r-- | test/test-functions | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 2b980b45f0..14f682755a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1433,7 +1433,7 @@ EXTRA_DIST += \ test/c.service \ test/daughter.service \ test/d.service \ - test/end.service \ + test/end.service.in \ test/e.service \ test/f.service \ test/grandchild.service \ 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 |