systemd: Configure shutdown watchdog to 20min
There were reports of the shutdown watchdog firing in #522 which caused
the flashing process to fail. Andrew Geissler suggested he reached ~77%
before the watchdog bit, which by default is configured at 10 minutes.
Back-of-the-envelope calculations suggest it would've taken
approximately 13 minutes to complete the flash, therefore bump the
number to 20min to give ourselves a bit of head-room.
Change-Id: I967b13799469d22a380b29f5566ab8cc9432ce8c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/shutdown-watchdog.conf b/meta-phosphor/common/recipes-core/systemd/systemd/shutdown-watchdog.conf
new file mode 100644
index 0000000..a956f83
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/systemd/shutdown-watchdog.conf
@@ -0,0 +1,15 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See systemd-system.conf(5) for details.
+
+[Manager]
+ShutdownWatchdogSec=20min
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
index a93de86..5cc25db 100644
--- a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
@@ -6,16 +6,19 @@
quotacheck kdbus ima smack polkit logind bootchart utmp"
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
SRC_URI += "file://default.network"
+SRC_URI += "file://shutdown-watchdog.conf"
SRC_URI += "file://0001-Export-message_append_cmdline.patch"
SRC_URI += "file://0002-systemd-Make-pam-compile-shared-library.patch"
RRECOMMENDS_${PN} += "obmc-targets"
FILES_${PN} += "${libdir}/systemd/network/default.network"
+FILES_${PN} += "${libdir}/systemd/system.conf.d/shutdown-watchdog.conf"
EXTRA_OECONF += " --disable-hwdb"
do_install_append() {
install -m 644 ${WORKDIR}/default.network ${D}${libdir}/systemd/network/
+ install -m 644 -D ${WORKDIR}/shutdown-watchdog.conf ${D}${libdir}/systemd/system.conf.d/shutdown-watchdog.conf
#TODO Remove after this issue is resolved
#https://github.com/openbmc/openbmc/issues/152