Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathaniel Roach <nroach44@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/quagga: Add systemd.service file
Date: Wed, 29 Jun 2016 20:02:47 +0800	[thread overview]
Message-ID: <1a81eea6-95a9-7bc1-aee2-8780caecba8a@gmail.com> (raw)
In-Reply-To: <49651e9d-0a96-c7de-fb8b-1ec4e21324f8@mind.be>

On 29/06/16 17:53, Arnout Vandecappelle wrote:
> (Mainly improving my systemd knowledge here :-)
>
> On 29-06-16 09:06, Nathaniel Roach wrote:
>> On 27/06/16 05:09, Arnout Vandecappelle wrote:
>>> On 25-06-16 19:02, Nathaniel Roach wrote:
> [snip]
>>>    However, since the Wants= is added for zebra, it would make sense to create the
>>> zebra symlink, no?
>> No, systemd will automatically start zebra when it's needed. It's not needed
>> until one of the other daemons start (which systemd will start zebra beforehand
>> if the daemon is local). If they are remote, the user can enable zebra themselves.
>   So, if there is a Wants=quagga at zebra.service line, then systemd will look for
> quagga at zebra.service in /usr/lib/systemd/services, and failing that it will
> automatically try quagga at .service? Nice!
Pretty much! 
/etc/systemd/system/multi-user.target.wants/quagga at zebra.service is 
installed on systemctl enable [...] and it's just a symlink to
quagga at .service
> [snip]
>>>> +Wants=quagga at zebra.service
>>>    I just realize now: this line should probably be removed when
>>> BR2_PACKAGE_QUAGGA_ZEBRA is not set.
>> Also true, however that's why I said Wants= and not Requires= so systemd handles
>> the lack of zebra fine.
>   So in case zebra doesn't exist, systemd will still try to execute the service
> file, but the ExecStart command will fail because /usr/sbin/zebra doesn't exist,
> right? But in that case, won't it retry every second (Restart=on-failure) and
> spam the journal horribly?
>
>   Maybe there should be a ConditionFileIsExecutable in the [Unit] section?
That was a good condition that I didn't think of. In that case the unit 
will fail and restart until it hits the start limit. I've since added in 
the Condition stanza and everything works as intended.
>
>
>   Regards,
>   Arnout
>
>

  reply	other threads:[~2016-06-29 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-25 17:02 [Buildroot] [PATCH] package/quagga: Add systemd.service file Nathaniel Roach
2016-06-26 21:09 ` Arnout Vandecappelle
2016-06-29  7:06   ` Nathaniel Roach
2016-06-29  9:53     ` Arnout Vandecappelle
2016-06-29 12:02       ` Nathaniel Roach [this message]
2016-07-01 21:47         ` 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=1a81eea6-95a9-7bc1-aee2-8780caecba8a@gmail.com \
    --to=nroach44@gmail.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