Display static inet ip from vnet jail config

This commit is contained in:
Jose
2020-05-14 12:03:32 -04:00
parent 4019e0d374
commit 85a17237e6
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -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.
+4
View File
@@ -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;
+1 -1
View File
@@ -1 +1 @@
1.0.60 1.0.61