diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-04-20 19:26:14 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-04-20 19:26:14 +0000 |
commit | 7bc718ba7116b09749633b799834cf7fc2212455 (patch) | |
tree | 64bae4f604cb3d58af7bac10676b9fe7eecc66ab /usr/local/www/diag_pkglogs.php | |
parent | 42e72ab3c95841402ac8733d46e00afc64c84453 (diff) | |
download | pfsense-7bc718ba7116b09749633b799834cf7fc2212455.zip pfsense-7bc718ba7116b09749633b799834cf7fc2212455.tar.gz |
Alert when we cannot locate the package configuration file
Diffstat (limited to 'usr/local/www/diag_pkglogs.php')
-rwxr-xr-x | usr/local/www/diag_pkglogs.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php index 89c8cc5..2d089ac 100755 --- a/usr/local/www/diag_pkglogs.php +++ b/usr/local/www/diag_pkglogs.php @@ -54,6 +54,9 @@ $apkg = $_POST['pkg']; if(!isset($_POST['pkg'])) { // If we aren't looking for a specific package, locate the first package that handles logging. if(is_array($config['installedpackages']['package'])) { foreach($config['installedpackages']['package'] as $package) { + if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) { + $statustext = "Could not locate /usr/local/pkg/" . $package['configurationfile']; + } $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui"); if(is_array($pkg_config['logging'])) { $apkg = $package['name']; @@ -79,6 +82,9 @@ if(!isset($_POST['pkg'])) { // If we aren't looking for a specific package, loca <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <p class="pgtitle">Diagnostics: Package logs</p> +<?php + if($statustext <> "") echo $statustext; +?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td> <ul id="tabnav"> @@ -96,6 +102,9 @@ if(!isset($_POST['pkg'])) { // If we aren't looking for a specific package, loca exit(); } foreach($config['installedpackages']['package'] as $package) { + if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) { + echo "Could not locate /usr/local/pkg/" . $package['configurationfile']; + } $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui"); if(is_array($pkg_config['logging'])) { $pkgname = $package['name']; |