tests: don't hardcode systemctl path

Get it from type -P instead, to support --enable-split-usr.
This commit is contained in:
Martin Pitt 2015-02-02 00:19:30 +01:00 committed by Harald Hoyer
parent 3486cb6cfa
commit 53d90f9582
3 changed files with 4 additions and 3 deletions

View file

@ -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 \

View file

@ -3,4 +3,4 @@ Description=End the test
After=testsuite.service
[Service]
ExecStart=/usr/bin/systemctl poweroff --no-block
ExecStart=@SYSTEMCTL@ poweroff --no-block

View file

@ -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