From: Alarig Le Lay <alarig@swordarmor.fr>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Question about bird init script
Date: Tue, 5 Mar 2019 17:24:05 +0100 [thread overview]
Message-ID: <20190305162405.mngzgjjr7zzaqqqd@mew.swordarmor.fr> (raw)
In-Reply-To: <feb8e17c-ddee-ce38-4b4b-6e5497e7b2a7@gentoo.org>
Thanks for you help!
I just did one think differently, I explain it inline.
I will run bird 2.0.4 on my lab for the rest of the week, then I will
upgrade the production network gradually. I will propose my script to
the tree if it all succeeds.
On mar. 5 mars 10:01:08 2019, Michael Orlitzky wrote:
> On 3/5/19 6:03 AM, Alarig Le Lay wrote:
> > Okay, I tried to write another script:
> > https://git.grifon.fr/alarig/SwordArMor-gentoo-overlay/src/branch/master/net-misc/bird/files/initd-bird-2
> >
> > I deleted things, but added others. I’m not sure if I respect all the
> > openrc standards as I’m not very comfortable with it.
>
> That's OK, it already looks a lot better. And it works, which is nice =)
Hehe :)
> You probably want to specify the config file in check_run(). You might
> refactor the command_args as follows,
>
> client_args="-c ${CONF_FILE} -s ${SOCK}"
> command_args="${client_args} -P ${pidfile}"
>
> and then in check_run, you can use "birdc ${client_args}..."
The client doesn’t care about the configuration file, only about the
socket. However, I factored the socket and then added -r to restrict
read-only commands, in order to avoid protocol disabling during the
check.
“Option -r can be used to enable a restricted mode of BIRD client, which
allows just read-only commands (show ...).”
-- https://bird.network.cz/?get_doc&v=20&f=bird-4.html
client_args="-s ${SOCK}"
command_args="${client_args} -c ${CONF_FILE} -P ${pidfile}"
client_args="${client_args} -r"
I also factored my `birdc config check` command in check_run().
--
Alarig
next prev parent reply other threads:[~2019-03-05 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 10:33 [gentoo-user] Question about bird init script Alarig Le Lay
2019-03-04 14:05 ` Michael Orlitzky
2019-03-05 11:03 ` Alarig Le Lay
2019-03-05 15:01 ` Michael Orlitzky
2019-03-05 16:24 ` Alarig Le Lay [this message]
2019-03-05 19:45 ` Michael Orlitzky
2019-03-06 9:54 ` Alarig Le Lay
2019-04-05 20:55 ` Alarig Le Lay
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=20190305162405.mngzgjjr7zzaqqqd@mew.swordarmor.fr \
--to=alarig@swordarmor.fr \
--cc=gentoo-user@lists.gentoo.org \
/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