Extension adds watchdog package and enable watchdog device (/dev/wachdog)

support in config
This commit is contained in:
Igor Velkov 2025-12-09 04:24:19 +02:00 committed by Rolf Leggewie
parent 4cb8369f39
commit 5de9913cec

12
extensions/watchdog.sh Normal file
View File

@ -0,0 +1,12 @@
# for boards with watchdog support - add watchdog package and
# enable hardware watchdog device (/dev/watchdog) support in config
function extension_prepare_config__add_to_image_watchdog() {
display_alert "Extension: ${EXTENSION}: Adding extra package to image" "watchdog" "info"
add_packages_to_image watchdog
}
function post_customize_image__enable_watchdog_device_config() {
display_alert "Enable /dev/watchdog in /etc/watchdog.conf ${HOOK_POINT}" "${EXTENSION}" "info"
sed -e 'sX^#watchdog-deviceXwatchdog-deviceX' -i "${SDCARD}"/etc/watchdog.conf
}