diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-02 01:18:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-02 01:18:17 +0000 |
commit | 4fa9d187879a9fd3adc128ff4c2c0ff4b0fc475a (patch) | |
tree | e858d9d962772bd4ff2cf65d94ea15553e8b5cf9 | |
parent | 8d8f27a14a0aea5ca6778544f9f95d1285c5baf0 (diff) | |
download | pfsense-4fa9d187879a9fd3adc128ff4c2c0ff4b0fc475a.zip pfsense-4fa9d187879a9fd3adc128ff4c2c0ff4b0fc475a.tar.gz |
Move resync_all_packages_config to our utilities area
-rw-r--r-- | etc/inc/pfsense-utils.inc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index b7d2648..7d9730e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -509,5 +509,24 @@ function update_progress_bar($percent) { echo "\n</script>"; } +/* + * resync_all_packages_config() Forces packages to setup their configuration and rc.d files + */ +function resync_all_packages_config() { + log_error("Resyncing configuration for all packages."); + foreach($config['installedpackages']['package'] as $package) { + if(file_exists("/usr/local/pkg/" . $package['configurationfile'])) { + $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "pfsensepkgs"); + } else { + // XXX: FETCH configuration file. + $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "pfsensepkgs"); + } + if($pkg_config['custom_php_command_before_form'] <> "") eval($pkg_config['custom_php_command_before_form']); + if($pkg_config['custom_add_php_command'] <> "") eval($pkg_config['custom_add_php_command']); + if($pkg_config['custom_add_php_command_late'] <> "") eval($pkg_config['custom_add_php_command_late']); + if($pkg_config['custom_php_install_command'] <> "") eval($pkg_config['custom_php_install_command']); + // XXX: process template as well. + } +} -?> +?>
\ No newline at end of file |