diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-02-02 00:19:30 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2015-02-03 09:50:45 +0100 |
commit | 53d90f9582f96208b3674da823ad1a3d2c3b1aa4 (patch) | |
tree | 11a6b4becc3f7630be5c0eb1c7b5210c5f28f0a4 | |
parent | 3486cb6cfa3d32a95c0daf02c7510fdf372507bf (diff) |
tests: don't hardcode systemctl path
Get it from type -P instead, to support --enable-split-usr.
-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 |