[PATCH] Add the ability for a sysconfig file to determine extra parameters for bird

Alex Bligh alex at alex.org.uk
Wed Dec 11 22:06:29 CET 2013


On Ubuntu / Debian, you can use /etc/default/bird{,6} to specify
parameters to be passed to the bird daemon. As far as I can tell,
using the rpm spec file in the current srpm, you can't.

I do NOT claim to be a Redhat expert, but a patch like this would
seem to provide equivalent functionality. I am taking it
/etc/sysconfig is the right place.

Signed-off-by: Alex Bligh <alex at alex.org.uk>
---
 misc/bird.init |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/misc/bird.init b/misc/bird.init
index 56842bf..7556dc5 100755
--- a/misc/bird.init
+++ b/misc/bird.init
@@ -22,6 +22,9 @@
 BIRD4="yes"
 BIRD6="yes"
 
+BIRD4ARGS=
+BIRD6ARGS=
+
 [ -f /etc/bird.conf ] || BIRD4="no"
 [ -f /usr/sbin/bird ] || BIRD4="no"
 [ "${NETWORKING}" = "yes" ] || BIRD4="no"
@@ -30,6 +33,8 @@ BIRD6="yes"
 [ -f /usr/sbin/bird6 ] || BIRD6="no"
 [ "${NETWORKING_IPV6}" = "yes" ] || BIRD6="no"
 
+[ -e /etc/sysconfig/bird ] && . /etc/sysconfig/bird
+
 RETVAL=0
 
 # See how we were called.
@@ -38,7 +43,7 @@ case "$1" in
 	if [ "$BIRD4" = "yes" ]
 	then
 		echo -n "Starting BIRD for IPv4: "
-		daemon bird
+		daemon bird ${BIRD4ARGS}
 		RETVAL=$?
 		echo
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
@@ -46,7 +51,7 @@ case "$1" in
 	if [ "$BIRD6" = "yes" ]
 	then
 		echo -n "Starting BIRD for IPv6: "
-		daemon bird6
+		daemon bird6 ${BIRD6ARGS}
 		RETVAL=$?
 		echo
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird6
-- 
1.7.9.5




More information about the Bird-users mailing list