Files

19 lines
365 B
Bash
Raw Permalink Normal View History

2021-05-15 16:13:00 +02:00
#!/bin/sh
output=$(mktemp)
trap "rm -f $output" EXIT
keepalived -t -f output/"$1"/keepalived.conf 2> $output
ret=$?
>&2 cat $output
case $ret in
4)
# If we get this error, this is harmless. It's the last check
# keepalived does.
! grep -q "^Non-existent interface specified" $output || exit 0
exit 4
;;
esac
exit $ret