diff options
author | 2019-05-22 13:11:04 +0100 | |
---|---|---|
committer | 2019-05-22 13:11:18 +0100 | |
commit | 5c925cf427ea6590a61b9030cca0cae090f21201 (patch) | |
tree | 01a61873832aca51ba8ea82d7ee721827ed1e949 /net-misc/bird/files | |
parent | dev-java/maven-bin: clean up old. (diff) | |
download | gentoo-5c925cf427ea6590a61b9030cca0cae090f21201.tar.gz gentoo-5c925cf427ea6590a61b9030cca0cae090f21201.tar.bz2 gentoo-5c925cf427ea6590a61b9030cca0cae090f21201.zip |
net-misc/bird: 1.6.6 & 2.0.4 version bumps
New init script by Alarig Le Lay fixes bad behaviour for 2.x daemons,
by rewriting in a different style as suggested by Michael Orlitzky.
1.6.6 contains several bugfixes related to route propagation.
2.0.4 contains:
* OSPF: DN-bit handling (RFC 4576)
* Preferred route counters are back
* Important BGP bugfix
* Several bugfixes related to route propagation
* Some minor bugfixes
Closes: https://bugs.gentoo.org/682628
Bug: https://bugs.gentoo.org/622334
Suggested-By: Michael Orlitzky <mjo@gentoo.org>
Tested-by: Alarig Le Lay <alarig@swordarmor.fr>
Signed-Off-By: Tony Vroon <chainsaw@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'net-misc/bird/files')
-rw-r--r-- | net-misc/bird/files/initd-bird-2 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/net-misc/bird/files/initd-bird-2 b/net-misc/bird/files/initd-bird-2 new file mode 100644 index 000000000000..06030d4b3016 --- /dev/null +++ b/net-misc/bird/files/initd-bird-2 @@ -0,0 +1,51 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Copyright 2019 Alarig Le Lay <alarig@grifon.fr> +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +pidfile="/run/${RC_SVCNAME}.pid" +command="/usr/sbin/${RC_SVCNAME}" +retry=15 + +CONF_FILE="/etc/${RC_SVCNAME}.conf" +SOCK="/run/${RC_SVCNAME}.ctl" + +client_args="-s ${SOCK}" +command_args="${client_args} -c ${CONF_FILE} -P ${pidfile}" +client_args="${client_args} -r" + +depend() { + need net + use logger +} + +check_run() { + BIRD_CHECK_CONF="birdc ${client_args} configure check \"${CONF_FILE}\"" + # Check if the bird parser returns what we want + # We can’t use $? because it’s always 0 if the sock works + STATE=$(${BIRD_CHECK_CONF} | grep 'Configuration OK') + + if [ -n "${STATE}" ]; then + return 0 + else + # We remove the first three lines (garbage informations), the + # errors begin after that + eerror "$(${BIRD_CHECK_CONF} | sed '1,3d')" + return 1 + fi +} + +reload() { + check_run || return 1 + ebegin "Reloading BIRD" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ] ; then + check_run || return 1 + fi +} |