From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] owfs: add sysv init scripts
Date: Sun, 27 Mar 2016 00:53:01 +0100 [thread overview]
Message-ID: <87oaa0dcf6.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1458997246-17406-1-git-send-email-arnout@mind.be> (Arnout Vandecappelle's message of "Sat, 26 Mar 2016 14:00:46 +0100")
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
> owserver is started unconditionally, but it needs the device(s) to
> be specified at startup. Therefore a check for non-empty OWSERVER_ARGS
> is added to the owserver start script.
> owfs is started only if is built. It will connect to the owserver.
> It will try to load the fuse module; if fuse is built-in or already
> loaded, modprobe -q will fail silently. The filesystem will be mounted
> on /dev/1wire, because it represents the 1-wire slave devices; also,
> the bundled Debian init scripts mount it there. We have to create that
> directory in the init script in case of devtmpfs, and we have to create
> it in the rootfs for static /dev; for simplicity, just do both.
> Users who want a setup without owserver need to remove the owserver
> init script post-build and need to give appropriate defaults to owfs.
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v3: Create /dev/1wire for static /dev
> v2: Suggestions from PeterK:
> - prefix variables from defaults file with OWFS_;
> - allow defaults file to override the server with other devices;
> - add empty definition of OWFS_ARGS, to make it clearer that this
> variable can also be used in the defaults file.
> +++ b/package/owfs/S30owfs
> @@ -0,0 +1,33 @@
> +NAME="owfs"
> +DAEMON="/usr/bin/${NAME}"
> +PID_F="/run/${NAME}.pid"
> +OWFS_MOUNTPOINT="/dev/1wire"
> +OWFS_DEVICES="-s localhost:4304"
> +OWFS_ARGS=""
> +
> +[ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
> +
> +case "$1" in
> +start)
> + printf "Starting ${NAME}: "
> + # Fuse may be in a module, so try to load it
> + modprobe -q fuse && printf "[fuse] "
> + mkdir -p ${MOUNTPOINT}
This should be OWFS_MOUNTPOINT.
Committed with that fixed, thanks.
--
Bye, Peter Korsgaard
prev parent reply other threads:[~2016-03-26 23:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-26 13:00 [Buildroot] [PATCH v3] owfs: add sysv init scripts Arnout Vandecappelle
2016-03-26 23:53 ` Peter Korsgaard [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=87oaa0dcf6.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.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