meta-bletchley: motor-ctrl: Make init services auto start
We want to do motor-init and turn on ac when system boot-up,
make service instances link under /lib/systemd/system/multi-user.target.wants/
Change-Id: I53bc97270d111b90e0d70052f81a7e428805ead1
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb
index ba68288..41e0ce9 100644
--- a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb
@@ -25,10 +25,11 @@
install -m 0755 ${WORKDIR}/motor-init ${D}${libexecdir}
}
-MOTOR_INIT_INSTFMT="motor-init-calibration@.service:motor-init-calibration@{0}.service"
+TGT = "${SYSTEMD_DEFAULT_TARGET}"
+MOTOR_INIT_INSTFMT="../motor-init-calibration@.service:${TGT}.wants/motor-init-calibration@{0}.service"
PWR_ON_INSTFMT="host-poweron@.service:host-poweron@{0}.service"
PWR_OFF_INSTFMT="host-poweroff@.service:host-poweroff@{0}.service"
-AC_ON_INSTFMT="host-ac-on@.service:host-ac-on@{0}.service"
+AC_ON_INSTFMT="../host-ac-on@.service:${TGT}.wants/host-ac-on@{0}.service"
AC_OFF_INSTFMT="host-ac-off@.service:host-ac-off@{0}.service"
SYSTEMD_SERVICE:${PN} += "motor-init-calibration@.service"