Get it from type -P instead, to support --enable-split-usr.
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 \
After=testsuite.service
[Service]
-ExecStart=/usr/bin/systemctl poweroff --no-block
+ExecStart=@SYSTEMCTL@ poweroff --no-block
}
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