Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] dhcpcd: add SysV start-up script
Date: Sun, 5 Nov 2017 09:16:04 +0100	[thread overview]
Message-ID: <20171105081604.GB2996@scaer> (raw)
In-Reply-To: <20171104232246.444c7ca3@windsurf>

Thomas, Arnout,  All,

On 2017-11-04 23:22 +0100, Thomas Petazzoni spake thusly:
> On Sat, 4 Nov 2017 23:07:01 +0100, Arnout Vandecappelle wrote:
> >  Exactly. "Failure" anyway just means an error message on the console, not that
> > the system fails to boot.
> 
> Sure, but some scripts currently just "exit 0" with no error message
> whatsoever when the configuration file is missing.
> 
> So, let's summarize our policy:
> 
>  * Never check if the daemon executable is present, because that's
>    silly, Buildroot guarantees it's there.
> 
>  * If the daemon needs a configuration file, always check if it exists,
>    and if not, bail out with an error message.
> 
> But... wait, if Buildroot guarantees that it installs a configuration
> file for this daemon, having the init script check its presence is
> pretty much as silly as checking the presence of the daemon executable
> itself.
> 
> So?

  * Never check if the daemon executable is present, because that's
    silly: Buildroot guarantees it's there;

  * Never check for the daemon configuration file, because that's silly:
    Buildroot guarantees it's there;

  * Check if there is a startup-script override configuration file in
    /etc/default/<foo>, and source it if present.

The /etc/default/<foo> config file is here to override the options pased
to the daemoin, for example to add more options, or to entorely replace
them. Its format is daemon-dependent (we don't want to enforce one, at
least).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-11-05  8:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 22:36 [Buildroot] [PATCH 0/2] dhcpcd: start-up scripts Markus Mayer
2017-10-31 22:36 ` [Buildroot] [PATCH 1/2] dhcpcd: add SysV start-up script Markus Mayer
2017-11-02 22:06   ` Thomas Petazzoni
2017-11-02 22:18     ` Yann E. MORIN
2017-11-02 22:23       ` Thomas Petazzoni
2017-11-03 16:10         ` Yann E. MORIN
2017-11-03 16:17           ` Thomas Petazzoni
2017-11-03 16:31             ` Yann E. MORIN
2017-11-04 19:56         ` Arnout Vandecappelle
2017-11-04 22:03           ` Thomas Petazzoni
2017-11-04 22:07             ` Arnout Vandecappelle
2017-11-04 22:22               ` Thomas Petazzoni
2017-11-05  8:16                 ` Yann E. MORIN [this message]
2017-11-05  8:10           ` Yann E. MORIN
2017-11-05 12:18             ` Arnout Vandecappelle
2017-11-05 13:24               ` Thomas Petazzoni
2017-11-05 13:28               ` Yann E. MORIN
2017-11-03 15:59     ` Peter Korsgaard
2017-10-31 22:36 ` [Buildroot] [PATCH 2/2] dhcpcd: add systemd start-up service Markus Mayer
2017-11-02 22:06   ` Thomas Petazzoni

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=20171105081604.GB2996@scaer \
    --to=yann.morin.1998@free.fr \
    --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