diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-06-15 21:00:52 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-06-15 21:34:52 +0300 |
commit | 057594a8bb8d062d72244196170c2d78947d318a (patch) | |
tree | bd0ce34dac9b401ce5ac6919f1cd85239c526b82 /meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog | |
parent | 0ccb93d91de41b7db333efccc1aa8d03db1ef63f (diff) | |
download | openbmc-057594a8bb8d062d72244196170c2d78947d318a.tar.xz |
Update to internal 0.59
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh | 9 | ||||
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.service) | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh index b3afd73d3..3413fdb9f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh @@ -1,11 +1,16 @@ #!/bin/bash +echo "Watchdog being started by $1" > /dev/kmsg + if /sbin/fw_printenv bootfailures -n | grep -q 3; then exit 0 # passed boot limit, user started again on purpose fi -echo "Watchdog Failure Limit Reached, Failed Processes:" > /dev/kmsg -systemctl --failed --no-pager | grep failed > /dev/kmsg +if test -f "/tmp/nowatchdog"; then + echo "Not resetting due to nowatchdog file" > /dev/kmsg + exit 0 +fi + echo "Log as follows:" > /dev/kmsg journalctl -r -n 100 | while read line; do echo $line > /dev/kmsg; done diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service index 6a5ffb4ba..6b1ebc544 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.service +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service @@ -2,6 +2,6 @@ Description=Reset BMC Using Hardware Watchdog [Service] -ExecStart=/usr/bin/watchdog-reset.sh +ExecStart=/usr/bin/watchdog-reset.sh %i Type=oneshot |