From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] busybox: add watchdog daemon startup script
Date: Thu, 9 Feb 2012 13:42:55 +0100 [thread overview]
Message-ID: <20120209124255.GA1214@game.jcrosoft.org> (raw)
In-Reply-To: <1328783473-14658-1-git-send-email-fabio.porcedda@telit.com>
>
> if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
> diff --git a/package/busybox/S15watchdog b/package/busybox/S15watchdog
> new file mode 100644
> index 0000000..3a2e8eb
> --- /dev/null
> +++ b/package/busybox/S15watchdog
> @@ -0,0 +1,20 @@
> +#!/bin/sh
> +#
> +# Start watchdog
> +#
> +
> +case "$1" in
> + start)
> + echo "Starting watchdog..."
> + watchdog -t 5 /dev/watchdog
> + ;;
> + stop)
> + ;;
> + restart|reload)
> + ;;
> + *)
> + echo $"Usage: $0 {start|stop|restart}"
> + exit 1
> +esac
> +
> +exit $?
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 59448d5..88053ca 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -142,6 +142,16 @@ define BUSYBOX_INSTALL_LOGGING_SCRIPT
> else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
> endef
>
> +ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
> +define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
> + [ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \
> + install -D -m 0755 package/busybox/S15watchdog \
> + $(TARGET_DIR)/etc/init.d/S15watchdog && \
> + sed -i s/5/$(BR2_PACKAGE_BUSYBOX_WATCHDOG_RESETTIME)/ \
use somethink else than 5 for the sed
Best Regards,
J.
prev parent reply other threads:[~2012-02-09 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 10:31 [Buildroot] [PATCH v2] busybox: add watchdog daemon startup script Fabio Porcedda
2012-02-09 12:42 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120209124255.GA1214@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox