mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-05 20:24:09 +01:00
adding a couple vnet exceptions for ip4.addr checks
This commit is contained in:
@@ -58,9 +58,11 @@ if [ -z "${JAIL_NAME}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check jail ip4 address valid
|
# Check jail ip4 address valid
|
||||||
JAIL_IP=$(jls -j "${TARGET}" ip4.addr 2>/dev/null)
|
if [ "$(bastille config $TARGET get vnet)" != 'enabled' ]; then
|
||||||
if [ -z "${JAIL_IP}" -o "${JAIL_IP}" = "-" ]; then
|
JAIL_IP=$(jls -j "${TARGET}" ip4.addr 2>/dev/null)
|
||||||
error_exit "Jail IP not found: ${TARGET}"
|
if [ -z "${JAIL_IP}" -o "${JAIL_IP}" = "-" ]; then
|
||||||
|
error_exit "Jail IP not found: ${TARGET}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check rdr-anchor is setup in pf.conf
|
# Check rdr-anchor is setup in pf.conf
|
||||||
|
|||||||
@@ -226,10 +226,12 @@ for _jail in ${JAILS}; do
|
|||||||
|
|
||||||
## jail-specific variables.
|
## jail-specific variables.
|
||||||
bastille_jail_path=$(jls -j "${_jail}" path)
|
bastille_jail_path=$(jls -j "${_jail}" path)
|
||||||
_jail_ip=$(jls -j "${_jail}" ip4.addr 2>/dev/null)
|
if [ "$(bastille config $TARGET get vnet)" != 'enabled' ]; then
|
||||||
if [ -z "${_jail_ip}" -o "${_jail_ip}" = "-" ]; then
|
_jail_ip=$(jls -j "${_jail}" ip4.addr 2>/dev/null)
|
||||||
error_notify "Jail IP not found: ${_jail}"
|
if [ -z "${_jail_ip}" -o "${_jail_ip}" = "-" ]; then
|
||||||
_jail_ip='' # In case it was -. -- cwells
|
error_notify "Jail IP not found: ${_jail}"
|
||||||
|
_jail_ip='' # In case it was -. -- cwells
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## TARGET
|
## TARGET
|
||||||
|
|||||||
Reference in New Issue
Block a user