diff options
| author | Fabio Berton <fabio.berton@ossystems.com.br> | 2016-08-26 16:55:02 -0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-09 11:53:36 +0100 |
| commit | 38602249e2fb20eb4e9f95ea93e570eaf3a60cbe (patch) | |
| tree | 38a3328fdcbdfd0da29fbc94c0b1d29f8f7938d5 | |
| parent | 7a79aba22be0ca0bc3535dea64a79b697013337d (diff) | |
| download | poky-38602249e2fb20eb4e9f95ea93e570eaf3a60cbe.tar.gz | |
watchdog-config: Add recipe
Provides configuration files for watchdog.
Add watchdog-config as a runtime dependence of watchdog and remove
watchdog.conf file from watchdog installation.
(From OE-Core rev: 6864ad2e863205472f8ea2057c61e949dc450151)
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 69 insertions, 1 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb new file mode 100644 index 0000000000..8bf40f0f0e --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config.bb | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | SUMMARY = "Software watchdog" | ||
| 2 | DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ | ||
| 3 | working. If programs in user space are not longer executed it will reboot \ | ||
| 4 | the system." | ||
| 5 | HOMEPAGE = "http://watchdog.sourceforge.net/" | ||
| 6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" | ||
| 7 | |||
| 8 | LICENSE = "MIT-X" | ||
| 9 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
| 10 | |||
| 11 | SRC_URI = " \ | ||
| 12 | file://watchdog.default \ | ||
| 13 | file://watchdog.conf \ | ||
| 14 | " | ||
| 15 | |||
| 16 | do_install() { | ||
| 17 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog | ||
| 18 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf | ||
| 19 | } | ||
| 20 | |||
diff --git a/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf b/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf new file mode 100644 index 0000000000..c493d12d34 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #ping = 172.31.14.1 | ||
| 2 | #ping = 172.26.1.255 | ||
| 3 | #interface = eth0 | ||
| 4 | #file = /var/log/messages | ||
| 5 | #change = 1407 | ||
| 6 | |||
| 7 | # Uncomment to enable test. Setting one of these values to '0' disables it. | ||
| 8 | # These values will hopefully never reboot your machine during normal use | ||
| 9 | # (if your machine is really hung, the loadavg will go much higher than 25) | ||
| 10 | #max-load-1 = 24 | ||
| 11 | #max-load-5 = 18 | ||
| 12 | #max-load-15 = 12 | ||
| 13 | |||
| 14 | # Note that this is the number of pages! | ||
| 15 | # To get the real size, check how large the pagesize is on your machine. | ||
| 16 | #min-memory = 1 | ||
| 17 | |||
| 18 | #repair-binary = /usr/sbin/repair | ||
| 19 | #repair-timeout = | ||
| 20 | #test-binary = | ||
| 21 | #test-timeout = | ||
| 22 | |||
| 23 | watchdog-device = /dev/watchdog | ||
| 24 | |||
| 25 | # Defaults compiled into the binary | ||
| 26 | #temperature-device = | ||
| 27 | #max-temperature = 120 | ||
| 28 | |||
| 29 | # Defaults compiled into the binary | ||
| 30 | #admin = root | ||
| 31 | #interval = 1 | ||
| 32 | #logtick = 1 | ||
| 33 | #log-dir = /var/log/watchdog | ||
| 34 | |||
| 35 | # This greatly decreases the chance that watchdog won't be scheduled before | ||
| 36 | # your machine is really loaded | ||
| 37 | realtime = yes | ||
| 38 | priority = 1 | ||
| 39 | |||
| 40 | # Check if rsyslogd is still running by enabling the following line | ||
| 41 | #pidfile = /var/run/rsyslogd.pid | ||
| 42 | |||
diff --git a/meta/recipes-extended/watchdog/watchdog-config/watchdog.default b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default new file mode 100644 index 0000000000..647d5abca5 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # Start watchdog at boot time? 0 or 1 | ||
| 2 | run_watchdog=1 | ||
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb index 1c0049c7af..cedfc042ce 100644 --- a/meta/recipes-extended/watchdog/watchdog_5.15.bb +++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb | |||
| @@ -40,6 +40,9 @@ INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." | |||
| 40 | do_install_append() { | 40 | do_install_append() { |
| 41 | install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh | 41 | install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh |
| 42 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive | 42 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive |
| 43 | |||
| 44 | # watchdog.conf is provided by the watchdog-config recipe | ||
| 45 | rm ${D}${sysconfdir}/watchdog.conf | ||
| 43 | } | 46 | } |
| 44 | 47 | ||
| 45 | PACKAGES =+ "${PN}-keepalive" | 48 | PACKAGES =+ "${PN}-keepalive" |
| @@ -49,7 +52,8 @@ FILES_${PN}-keepalive = " \ | |||
| 49 | ${sbindir}/wd_keepalive \ | 52 | ${sbindir}/wd_keepalive \ |
| 50 | " | 53 | " |
| 51 | 54 | ||
| 52 | RDEPENDS_${PN} += "${PN}-keepalive" | 55 | RDEPENDS_${PN} += "${PN}-config ${PN}-keepalive" |
| 56 | RDEPENDS_${PN}-keepalive += "${PN}-config" | ||
| 53 | 57 | ||
| 54 | RRECOMMENDS_${PN} = "kernel-module-softdog" | 58 | RRECOMMENDS_${PN} = "kernel-module-softdog" |
| 55 | 59 | ||
