diff options
-rw-r--r-- | meta/recipes-core/systemd/systemd_250.5.bb | 8 | ||||
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog-config.bb | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb index 006b2f86ea..6fac27ee56 100644 --- a/meta/recipes-core/systemd/systemd_250.5.bb +++ b/meta/recipes-core/systemd/systemd_250.5.bb | |||
@@ -238,6 +238,9 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | |||
238 | -Dnologin-path=${base_sbindir}/nologin \ | 238 | -Dnologin-path=${base_sbindir}/nologin \ |
239 | -Dumount-path=${base_bindir}/umount" | 239 | -Dumount-path=${base_bindir}/umount" |
240 | 240 | ||
241 | # The 60 seconds is watchdog's default vaule. | ||
242 | WATCHDOG_TIMEOUT ??= "60" | ||
243 | |||
241 | do_install() { | 244 | do_install() { |
242 | meson_do_install | 245 | meson_do_install |
243 | install -d ${D}/${base_sbindir} | 246 | install -d ${D}/${base_sbindir} |
@@ -337,6 +340,11 @@ do_install() { | |||
337 | 340 | ||
338 | # add a profile fragment to disable systemd pager with busybox less | 341 | # add a profile fragment to disable systemd pager with busybox less |
339 | install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh | 342 | install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh |
343 | |||
344 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then | ||
345 | sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \ | ||
346 | ${D}/${sysconfdir}/systemd/system.conf | ||
347 | fi | ||
340 | } | 348 | } |
341 | 349 | ||
342 | python populate_packages:prepend (){ | 350 | python populate_packages:prepend (){ |
diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb index a28d28033b..f138952128 100644 --- a/meta/recipes-extended/watchdog/watchdog-config.bb +++ b/meta/recipes-extended/watchdog/watchdog-config.bb | |||
@@ -13,8 +13,15 @@ SRC_URI = " \ | |||
13 | file://watchdog.conf \ | 13 | file://watchdog.conf \ |
14 | " | 14 | " |
15 | 15 | ||
16 | # The default value is 60 seconds when null. | ||
17 | WATCHDOG_TIMEOUT ??= "" | ||
18 | |||
16 | do_install() { | 19 | do_install() { |
17 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog | 20 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog |
18 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf | 21 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf |
22 | |||
23 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then | ||
24 | echo "watchdog-timeout = ${WATCHDOG_TIMEOUT}" >> ${D}/etc/watchdog.conf | ||
25 | fi | ||
19 | } | 26 | } |
20 | 27 | ||