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