adding a couple vnet exceptions for ip4.addr checks

This commit is contained in:
Christer Edwards
2021-01-01 09:23:26 -07:00
parent 4136f8fff4
commit 83a83e087e
2 changed files with 11 additions and 7 deletions

View File

@@ -58,9 +58,11 @@ if [ -z "${JAIL_NAME}" ]; then
fi
# Check jail ip4 address valid
JAIL_IP=$(jls -j "${TARGET}" ip4.addr 2>/dev/null)
if [ -z "${JAIL_IP}" -o "${JAIL_IP}" = "-" ]; then
error_exit "Jail IP not found: ${TARGET}"
if [ "$(bastille config $TARGET get vnet)" != 'enabled' ]; then
JAIL_IP=$(jls -j "${TARGET}" ip4.addr 2>/dev/null)
if [ -z "${JAIL_IP}" -o "${JAIL_IP}" = "-" ]; then
error_exit "Jail IP not found: ${TARGET}"
fi
fi
# Check rdr-anchor is setup in pf.conf