1 |
Thanks for you help! |
2 |
|
3 |
I just did one think differently, I explain it inline. |
4 |
I will run bird 2.0.4 on my lab for the rest of the week, then I will |
5 |
upgrade the production network gradually. I will propose my script to |
6 |
the tree if it all succeeds. |
7 |
|
8 |
On mar. 5 mars 10:01:08 2019, Michael Orlitzky wrote: |
9 |
> On 3/5/19 6:03 AM, Alarig Le Lay wrote: |
10 |
> > Okay, I tried to write another script: |
11 |
> > https://git.grifon.fr/alarig/SwordArMor-gentoo-overlay/src/branch/master/net-misc/bird/files/initd-bird-2 |
12 |
> > |
13 |
> > I deleted things, but added others. I’m not sure if I respect all the |
14 |
> > openrc standards as I’m not very comfortable with it. |
15 |
> |
16 |
> That's OK, it already looks a lot better. And it works, which is nice =) |
17 |
|
18 |
Hehe :) |
19 |
|
20 |
> You probably want to specify the config file in check_run(). You might |
21 |
> refactor the command_args as follows, |
22 |
> |
23 |
> client_args="-c ${CONF_FILE} -s ${SOCK}" |
24 |
> command_args="${client_args} -P ${pidfile}" |
25 |
> |
26 |
> and then in check_run, you can use "birdc ${client_args}..." |
27 |
|
28 |
The client doesn’t care about the configuration file, only about the |
29 |
socket. However, I factored the socket and then added -r to restrict |
30 |
read-only commands, in order to avoid protocol disabling during the |
31 |
check. |
32 |
“Option -r can be used to enable a restricted mode of BIRD client, which |
33 |
allows just read-only commands (show ...).” |
34 |
-- https://bird.network.cz/?get_doc&v=20&f=bird-4.html |
35 |
|
36 |
client_args="-s ${SOCK}" |
37 |
command_args="${client_args} -c ${CONF_FILE} -P ${pidfile}" |
38 |
client_args="${client_args} -r" |
39 |
|
40 |
I also factored my `birdc config check` command in check_run(). |
41 |
|
42 |
-- |
43 |
Alarig |