VOL-3371:
- Miscellaneous fixes and enhancements for in-band script
- watchdog script for openolt and dev_mgmt_daemon processes
Change-Id: I993c95b15ceb23154646fe8b3a875ec09369e6ce
diff --git a/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postinst b/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postinst
index 7e74326..72b4b19 100644
--- a/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postinst
+++ b/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postinst
@@ -20,11 +20,14 @@
tar zxf /tmp/release_asgvolt64_V3.4.3.3.202002100101.tar.gz -C / 2>&1 > /dev/null
grep -q '\/opt\/bcm68620\/svk_init.sh' /etc/rc.local || sed -i -e '$i \/opt\/bcm68620\/svk_init.sh' /etc/rc.local
rm -f /run/bcm68620
+mkdir -p /opt/openolt && cp /tmp/watchdog/openolt_dev_mgmt_daemon_process_watchdog /opt/openolt
+[ -f /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog ] && grep -q '\/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog' /etc/rc.local || sed -i -e '$i nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &' /etc/rc.local
cp /tmp/init.d/dev_mgmt_daemon /etc/init.d
cp /tmp/init.d/openolt /etc/init.d
cp /tmp/logrotate.d/openolt /etc/logrotate.d
chmod +x /etc/init.d/dev_mgmt_daemon
chmod +x /etc/init.d/openolt
+chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
update-rc.d dev_mgmt_daemon defaults
update-rc.d openolt defaults
mv /tmp/openolt /broadcom
diff --git a/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postrm b/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postrm
index 2f514af..f799e09 100644
--- a/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postrm
+++ b/agent/device/asgvolt64/mkdebian/debian/asgvolt64.postrm
@@ -16,6 +16,7 @@
rm -rf /opt/bcm68620
+rm -rf /opt/openolt
rm -rf /broadcom
sed -i '\/opt\/bcm68620\/svk_init.sh/d' /etc/rc.local
rm -rf /run/bcm68620
diff --git a/agent/device/asgvolt64/mkdebian/debian/rules b/agent/device/asgvolt64/mkdebian/debian/rules
index 7298161..561c092 100755
--- a/agent/device/asgvolt64/mkdebian/debian/rules
+++ b/agent/device/asgvolt64/mkdebian/debian/rules
@@ -34,6 +34,7 @@
cp -a $(CURDIR)/debian/openolt $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/init.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
cp -a $(CURDIR)/debian/logrotate.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+ cp -a $(CURDIR)/debian/watchdog $(DEB_DH_INSTALL_SOURCEDIR)/tmp
#override_dh_shlibdeps:
# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(ONLP_LIB_PATH):$(OFDPA_LIB_PATH)