Under OpenBSD, add advbase value detection

This commit is contained in:
Tristan 2019-03-11 15:17:23 +01:00
parent 53d87dccd3
commit f379f6210a

View file

@ -916,6 +916,19 @@ fi
if [ `uname -s` == "OpenBSD" ]; then
if [ "$IS_ADVBASE" = 1 ]; then
if [[ ls /etc/hostname.carp* 1> /dev/null 2>&1 ]]; then
for advbase in $(ifconfig carp | grep advbase | awk -F 'advbase' '{print $2}' | awk '{print $1}' | xargs); do
if [[ "$advbase" gt 1 ]]; then
echo 'IS_ADVBASE FAILED!'
if [[ "$VERBOSE" == 1 ]]; then
echo "At least one CARP interface has advbase greater than 5 seconds!"
fi
fi
done
fi
fi
if [ "$IS_SOFTDEP" = 1 ]; then
grep -q "softdep" /etc/fstab || echo 'IS_SOFTDEP FAILED!'
fi