From ae9c3b62e558d9d880594359a0ac07f5916b4333 Mon Sep 17 00:00:00 2001 From: JRGTH Date: Fri, 5 Sep 2025 17:13:11 -0400 Subject: [PATCH] Display jail IP using bastille list buil-in command --- CHANGELOG | 1 + gui/bastille_manager-lib.inc | 6 +++--- version | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7e64849..645ead8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ ====================== Version Description +1.1.46......Display jail IP using bastille list buil-in command. 1.1.45......Code update for recent bastille boot settings changes. 1.1.44......Fix bastille version display under maintenance tab. 1.1.43......Update: Finish adding support for 14.3 release. diff --git a/gui/bastille_manager-lib.inc b/gui/bastille_manager-lib.inc index b81545f..20dfdca 100644 --- a/gui/bastille_manager-lib.inc +++ b/gui/bastille_manager-lib.inc @@ -223,9 +223,9 @@ function get_jail_infos() { if (!$r['id']): $r['id'] = "-"; endif; - // Set the IPv4 on the running jails. - //$r['ip'] = exec("/usr/sbin/jls | /usr/bin/grep {$item} | /usr/bin/awk '{print $2}'"); - $r['ip'] = exec("/usr/bin/grep -w 'ip4.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'"); + // Set the IP address on the running jails using bastille list command instead. + //$r['ip'] = exec("/usr/bin/grep -w 'ip4.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'"); + $r['ip'] = exec("/usr/local/bin/bastille list {$item} | awk '{print $7}' | sed 1d"); 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 ';'"); endif; diff --git a/version b/version index 1027df1..b1468fd 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.1.45 +1.1.46