[OE-core] [PATCH 2/2] watchdog-config: Add recipe
Fabio Berton
fabio.berton at ossystems.com.br
Tue Sep 6 13:44:05 UTC 2016
ping?
On Fri, Aug 26, 2016 at 4:55 PM, Fabio Berton <fabio.berton at ossystems.com.br
> wrote:
> Provides configuration files for watchdog.
> Add watchdog-config as a runtime dependence of watchdog and remove
> watchdog.conf file from watchdog installation.
>
> Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> ---
> meta/recipes-extended/watchdog/watchdog-config.bb | 20 +++++++++++
> .../watchdog/watchdog-config/watchdog.conf | 42
> ++++++++++++++++++++++
> .../watchdog/watchdog-config/watchdog.default | 2 ++
> meta/recipes-extended/watchdog/watchdog_5.15.bb | 6 +++-
> 4 files changed, 69 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-extended/watchdog/watchdog-config.bb
> create mode 100644 meta/recipes-extended/watchdog/watchdog-config/
> watchdog.conf
> create mode 100644 meta/recipes-extended/watchdog/watchdog-config/
> watchdog.default
>
> diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb
> b/meta/recipes-extended/watchdog/watchdog-config.bb
> new file mode 100644
> index 0000000..8bf40f0
> --- /dev/null
> +++ b/meta/recipes-extended/watchdog/watchdog-config.bb
> @@ -0,0 +1,20 @@
> +SUMMARY = "Software watchdog"
> +DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
> +working. If programs in user space are not longer executed it will reboot
> \
> +the system."
> +HOMEPAGE = "http://watchdog.sourceforge.net/"
> +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194
> "
> +
> +LICENSE = "MIT-X"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=
> 3da9cfbcb788c80a0384361b4de20420"
> +
> +SRC_URI = " \
> + file://watchdog.default \
> + file://watchdog.conf \
> +"
> +
> +do_install() {
> + install -Dm 0644 ${WORKDIR}/watchdog.default
> ${D}${sysconfdir}/default/watchdog
> + install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.
> conf
> +}
> +
> 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 0000000..c493d12
> --- /dev/null
> +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf
> @@ -0,0 +1,42 @@
> +#ping = 172.31.14.1
> +#ping = 172.26.1.255
> +#interface = eth0
> +#file = /var/log/messages
> +#change = 1407
> +
> +# Uncomment to enable test. Setting one of these values to '0' disables
> it.
> +# These values will hopefully never reboot your machine during normal use
> +# (if your machine is really hung, the loadavg will go much higher than
> 25)
> +#max-load-1 = 24
> +#max-load-5 = 18
> +#max-load-15 = 12
> +
> +# Note that this is the number of pages!
> +# To get the real size, check how large the pagesize is on your machine.
> +#min-memory = 1
> +
> +#repair-binary = /usr/sbin/repair
> +#repair-timeout =
> +#test-binary =
> +#test-timeout =
> +
> +watchdog-device = /dev/watchdog
> +
> +# Defaults compiled into the binary
> +#temperature-device =
> +#max-temperature = 120
> +
> +# Defaults compiled into the binary
> +#admin = root
> +#interval = 1
> +#logtick = 1
> +#log-dir = /var/log/watchdog
> +
> +# This greatly decreases the chance that watchdog won't be scheduled
> before
> +# your machine is really loaded
> +realtime = yes
> +priority = 1
> +
> +# Check if rsyslogd is still running by enabling the following line
> +#pidfile = /var/run/rsyslogd.pid
> +
> 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 0000000..647d5ab
> --- /dev/null
> +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default
> @@ -0,0 +1,2 @@
> +# Start watchdog at boot time? 0 or 1
> +run_watchdog=1
> diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb
> b/meta/recipes-extended/watchdog/watchdog_5.15.bb
> index 1c0049c..cedfc04 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 ."
> do_install_append() {
> install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/
> watchdog.sh
> install -Dm 0755 ${WORKDIR}/wd_keepalive.init
> ${D}${sysconfdir}/init.d/wd_keepalive
> +
> + # watchdog.conf is provided by the watchdog-config recipe
> + rm ${D}${sysconfdir}/watchdog.conf
> }
>
> PACKAGES =+ "${PN}-keepalive"
> @@ -49,7 +52,8 @@ FILES_${PN}-keepalive = " \
> ${sbindir}/wd_keepalive \
> "
>
> -RDEPENDS_${PN} += "${PN}-keepalive"
> +RDEPENDS_${PN} += "${PN}-config ${PN}-keepalive"
> +RDEPENDS_${PN}-keepalive += "${PN}-config"
>
> RRECOMMENDS_${PN} = "kernel-module-softdog"
>
> --
> 2.1.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160906/040bb6c7/attachment-0002.html>
More information about the Openembedded-core
mailing list