From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] package/collectd: add init script for SysV
Date: Sat, 26 Oct 2019 09:23:01 +0200 [thread overview]
Message-ID: <20191026092301.4254482d@windsurf.home> (raw)
In-Reply-To: <20191026071905.23036-1-asafka7@gmail.com>
Hello Asaf,
On Sat, 26 Oct 2019 10:19:04 +0300
Asaf Kahlon <asafka7@gmail.com> wrote:
> Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
> ---
> v1->v2: use start-stop-daemon
> ---
> package/collectd/S90collectd | 36 ++++++++++++++++++++++++++++++++++++
> package/collectd/collectd.mk | 5 +++++
> 2 files changed, 41 insertions(+)
> create mode 100644 package/collectd/S90collectd
>
> diff --git a/package/collectd/S90collectd b/package/collectd/S90collectd
> new file mode 100644
> index 0000000000..3c5af17674
> --- /dev/null
> +++ b/package/collectd/S90collectd
> @@ -0,0 +1,36 @@
> +#!/bin/sh
> +
> +DAEMON="collectd"
> +PIDFILE="/var/run/$DAEMON.pid"
> +
> +start() {
> + printf "Starting collectd... "
> + start-stop-daemon -b -m -S -q -p $PIDFILE -x "/usr/sbin/$DAEMON"
Does this actually works? In your v1, you were just starting the
collectd daemon, without anything to put it in the background, so it
suppose it would automatically fork itself and go in the background.
This would not play very well with start-stop-daemon, so I was assuming
you would need to pass some collectd option to keep it in the
foreground, and let start-stop-daemon do the daemonization.
Did you test your v2 on the target ? Does the pidfile really contains
the PID of the daemon that is running ? Does the stop action actually
works ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-10-26 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-26 7:19 [Buildroot] [PATCH v2 1/1] package/collectd: add init script for SysV Asaf Kahlon
2019-10-26 7:19 ` [Buildroot] [PATCH v2 1/1] package/uvw: new package Asaf Kahlon
2019-10-26 12:31 ` Gilles Talis
2019-10-26 13:39 ` Asaf Kahlon
2019-10-26 7:23 ` Thomas Petazzoni [this message]
2019-10-26 7:31 ` [Buildroot] [PATCH v2 1/1] package/collectd: add init script for SysV Asaf Kahlon
2019-10-28 18:37 ` Carlos Santos
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=20191026092301.4254482d@windsurf.home \
--to=thomas.petazzoni@bootlin.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