Fix bastille version display under maintenance tab

This commit is contained in:
JRGTH
2025-09-04 14:15:46 -04:00
parent 985d5adf39
commit 74428e54e1
3 changed files with 7 additions and 3 deletions

7
gui/bastille_manager-lib.inc Executable file → Normal file
View File

@@ -90,8 +90,11 @@ function is_dir_empty($reldir) {
function get_version_bastille() {
global $tarballversion, $prdname;
if (is_file("{$tarballversion}")) {
//exec("/bin/cat {$tarballversion}", $result);
exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'\"' -f2", $result);
// For some reason bastille bin version value isn't double quoted anymore so we can't use the old delimiter.
// we will keep the old line for reference.
//exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'\"' -f2", $result);
exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'=' -f2", $result);
return ($result[0] ?? '');
}
else {