diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install index 512e0529455e..5bae3b607c53 100644 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install +++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install @@ -14,6 +14,7 @@ s6100/scripts/soft-reboot_plugin usr/share/sonic/device/x86_64-dell_s6100_c2538- s6100/scripts/ssd-fw-upgrade usr/share/sonic/device/x86_64-dell_s6100_c2538-r0 s6100/scripts/override.conf /etc/systemd/system/systemd-reboot.service.d s6100/scripts/s6100_serial_getty_monitor etc/monit/conf.d +s6100/scripts/check-getty.sh usr/local/bin common/dell_lpc_mon.sh usr/local/bin s6100/scripts/s6100_ssd_mon.sh usr/local/bin s6100/scripts/s6100_ssd_upgrade_status.sh usr/local/bin diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/check-getty.sh b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/check-getty.sh new file mode 100755 index 000000000000..9c6412eddf0b --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/check-getty.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +RETRY=0 +while [ $RETRY -lt 5 ]; do + let RETRY=$RETRY+1 + + /bin/systemctl --quiet is-active serial-getty@ttyS1.service + status=$? + if [ $status == 0 ]; then + exit 0 + fi + + # when serial-getty not running, recheck later, beause systemd will restart serial-getty automatically. + sleep 1 +done + +exit 1 \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor index 1b5d0c90db37..f57ae3679016 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor @@ -1,4 +1,5 @@ #Dell S6100 serial getty monitor -check process serial-getty matching "ttyS" +check program serial-getty with path /usr/local/bin/check-getty.sh start program = "/bin/systemctl start serial-getty@ttyS1.service" stop program = "/bin/systemctl stop serial-getty@ttyS1.service" +if status != 0 then restart \ No newline at end of file