summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-07 02:08:47 +0000
committerColin Smith <colin@pfsense.org>2005-03-07 02:08:47 +0000
commite93903c7b6b1a404418c3aa5ae0f55dcd82d28e1 (patch)
tree6a5fc9018c13f03dafc5d88750e68febd8ea5840 /etc/inc
parent04e6e7b7e9537bcc0b42b80ac015bacbb0a50a5b (diff)
downloadpfsense-e93903c7b6b1a404418c3aa5ae0f55dcd82d28e1.zip
pfsense-e93903c7b6b1a404418c3aa5ae0f55dcd82d28e1.tar.gz
Add checking of additional item XML.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 332e035..4edabef 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -550,6 +550,22 @@ function resync_all_package_configs_bootup($show_message) {
if($pkg_config['custom_php_command_before_form'] <> "") eval($pkg_config['custom_php_command_before_form']);
if($pkg_config['custom_php_resync_config_command'] <> "") eval($pkg_config['custom_php_resync_config_command']);
if($show_message == true) print "Synced " . $package['name'] . ".\n";
+ if($pkg_config['additional_files_needed'] != "") {
+ foreach($pkg_config['additional_files_needed']['item'] as $item) {
+ $pkg_name = strrchr($item, "/");
+ if(!preg_match("/.xml/i", $pkg_name)) break;
+ if(!file_exists("/usr/local/pkg/" . $pkg_name)) {
+ if($show_message == true) print "Fetching " . $pkg_name . ".\n";
+ log_error("Fetching missing configuration XML for " . $pkg_name);
+ system("/usr/bin/fetch -o /usr/local/pkg/" . $pkg_name . " " . $item);
+ }
+ $item_config = parse_xml_config_pkg("/usr/local/pkg" . $pkg_name, "packagegui");
+ if($show_message == true) print "Syncing " . $item_config['name'] . ".\n";
+ if($item_config['custom_php_command_before_form'] <> "") eval($item_config['custom_php_command_before_form']);
+ if($item_config['custom_php_resync_config_command'] <> "") eval($item_config['custom_php_resync_config_command']);
+ if($show_message == true) print "Synced " . $item_config['name'] . ".\n";
+ }
+ }
}
}
OpenPOWER on IntegriCloud