chiark / gitweb /
tests: don't hardcode systemctl path
[elogind.git] / test / test-functions
index a0f1bf4eb2a3ca27bedc591cd68c58b4e9aeb68a..42c954d5658fe18773c9fbe673d0c623ed461bc5 100644 (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