Skip NTP checks from within a FreeBSD jail (#281)

This commit is contained in:
Alex Zepeda 2016-09-22 02:39:55 -07:00 committed by Michael Boelen
parent 06c11432ed
commit 100afa5f5b
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@
# Skip NTP tests if we are in a DomU xen instance YYY # Skip NTP tests if we are in a DomU xen instance YYY
FIND=$(cat /sys/hypervisor/type) FIND=$(cat /sys/hypervisor/type)
if [ "${FIND}" = "xen" ]; then PREQS_MET="NO"; else PREQS_MET="YES"; fi if [ "${FIND}" = "xen" ]; then PREQS_MET="NO"; else PREQS_MET="YES"; fi
elif [ -f /sbin/sysctl ] && [ "`/sbin/sysctl -n security.jail.jailed 2>/dev/null || echo 0`" -eq 1 ]; then
# Skip NTP tests if we're in a FreeBSD jail
PREQS_MET="NO"
else else
PREQS_MET="YES" PREQS_MET="YES"
fi fi