mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-26 07:21:15 +01:00
fixed issue no vnet ip address if jail down
issue with no vnet ip address being displayed when jail is down fixed
This commit is contained in:
@@ -90,7 +90,7 @@ if [ $# -gt 0 ]; then
|
||||
else
|
||||
JAIL_STATE=$(if [ "$(sed -n "/^${_JAIL} {$/,/^}$/p" "${bastille_jailsdir}/${_JAIL}/jail.conf" | awk '$0 ~ /^'${_JAIL}' \{|\}/ { printf "%s",$0 }')" == "${_JAIL} {}" ]; then echo "Down"; else echo "n/a"; fi)
|
||||
if [ "$(awk '$1 == "vnet;" { print $1 }' "${bastille_jailsdir}/${_JAIL}/jail.conf")" ]; then
|
||||
JAIL_IP=$(sed -n 's/^ifconfig_vnet0="inet \(.*\)\/.*$/\1/p' "${bastille_jailsdir}/${_JAIL}/root/etc/rc.conf")
|
||||
JAIL_IP=$(sed -n 's/^ifconfig_vnet0="inet \(.*\)"$/\1/p' "${bastille_jailsdir}/${_JAIL}/root/etc/rc.conf")
|
||||
else
|
||||
JAIL_IP=$(sed -n "s/^[ ]*ip4.addr[ ]*=[ ]*\(.*\);$/\1/p" "${bastille_jailsdir}/${_JAIL}/jail.conf")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user