Display static inet ip from vnet jail config
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.61......Display static inet ip from vnet jail config.
|
||||||
1.0.60......Include missing bits, disable vnet on versions below 12.
|
1.0.60......Include missing bits, disable vnet on versions below 12.
|
||||||
1.0.59......Add a skip link to the initial help banner.
|
1.0.59......Add a skip link to the initial help banner.
|
||||||
1.0.58......Add Spanish translation thanks to raul fernandez garcia.
|
1.0.58......Add Spanish translation thanks to raul fernandez garcia.
|
||||||
|
|||||||
@@ -205,6 +205,10 @@ function get_jail_infos() {
|
|||||||
if (!$r['ip']):
|
if (!$r['ip']):
|
||||||
$r['ip'] = exec("/usr/bin/grep -w 'ip6.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'");
|
$r['ip'] = exec("/usr/bin/grep -w 'ip6.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'");
|
||||||
endif;
|
endif;
|
||||||
|
// Try to get ip from vnet config.
|
||||||
|
if(!$r['ip']):
|
||||||
|
$r['ip'] = exec("/usr/local/bin/bastille cmd {$item} cat /etc/rc.conf | /usr/bin/grep 'ifconfig_vnet0=' | cut -d'\"' -f2 | sed 's/inet //'");
|
||||||
|
endif;
|
||||||
if (!$r['ip']):
|
if (!$r['ip']):
|
||||||
$r['ip'] = "-";
|
$r['ip'] = "-";
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
Reference in New Issue
Block a user