Adding comments
This commit is contained in:
parent
2d306ec392
commit
8b0ceb8e34
|
@ -25,13 +25,17 @@ checkconfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_run() {
|
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')
|
grep 'Configuration OK')
|
||||||
|
|
||||||
if [ -n "${STATE}" ]; then
|
if [ -n "${STATE}" ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
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')"
|
sed '1d;2d')"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue