From 8b0ceb8e340b9c1f063ef8b28375946de05ff9bb Mon Sep 17 00:00:00 2001 From: alarig Date: Tue, 5 Mar 2019 12:02:14 +0100 Subject: [PATCH] Adding comments --- net-misc/bird/files/initd-bird-2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net-misc/bird/files/initd-bird-2 b/net-misc/bird/files/initd-bird-2 index 036e49f..dd6f8bc 100755 --- a/net-misc/bird/files/initd-bird-2 +++ b/net-misc/bird/files/initd-bird-2 @@ -25,13 +25,17 @@ checkconfig() { } check_run() { - STATE=$(birdc -s /var/run/bird.ctl 'configure check' | \ + # Check if the bird parser returns what we want + # We can’t use $? because it’s always 0 if the sock works + STATE=$(birdc -s ${SOCK} 'configure check' | \ grep 'Configuration OK') if [ -n "${STATE}" ]; then return 0 else - eerror "$(birdc -s /var/run/bird.ctl 'configure check' | \ + # We remove the first two lines (garbage informations), the + # errors begin at the third + eerror "$(birdc -s ${SOCK} 'configure check' | \ sed '1d;2d')" return 1 fi