meta-bletchley: motor-ctrl: Add retry and error handle to motor-init service

1. While motor-init-calibration@.service fail,retry to start service with maximum count 5 times.
2. In case of service unexpected stopped while motor is running, add stop motor
command after service stopped to avoid motor runs forever.
3. Add sled present check in motor-ctrl tool

Change-Id: Ie636f3a7dbf656f8ea577bfffed150171f7f07be
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service
index aab61b7..41f81c2 100644
--- a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service
@@ -1,11 +1,16 @@
 [Unit]
 Description=Motor Initialize for sled%i
+StartLimitIntervalSec=90
+StartLimitBurst=5
 
 [Service]
 ExecStart=/usr/libexec/motor-init sled%i
 SyslogIdentifier=Motor Initialize sled%i
 Type=oneshot
 RemainAfterExit=yes
+ExecStopPost=/usr/libexec/motor-ctrl sled%i s
+Restart=on-failure
+RestartSec=1
 
 [Install]
 WantedBy=multi-user.target