From c8be287ad7550b912078e53ec37875f6e80d00a8 Mon Sep 17 00:00:00 2001 From: Dallas Date: Tue, 12 May 2020 15:59:56 -0500 Subject: [PATCH] Fix issue with PHP error written to system.log Thanks for the recommendation @oraclesod --- check_pf_version | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/check_pf_version b/check_pf_version index 7b0013e..489ad78 100644 --- a/check_pf_version +++ b/check_pf_version @@ -9,7 +9,15 @@ # Modified 17 Oct 2019 require_once("pkg-utils.inc"); -$system_pkg_version = get_system_pkg_version(); +global $g; + +if (file_exists("{$g['varrun_path']}/pkg.dirty")) { +$system_pkg_version = get_system_pkg_version(false,false); +} else { +shell_exec("sudo touch "."{$g['varrun_path']}/pkg.dirty"); +$system_pkg_version = get_system_pkg_version(false,false); +shell_exec("sudo rm " . "{$g['varrun_path']}/pkg.dirty"); +} $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));