diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-13 23:38:43 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-13 23:38:43 +0000 |
commit | 068b878421ec75c16ee0506327a199c06c24be62 (patch) | |
tree | 90a5bfeac75a561a3a514352fec42e88eff7afb3 /etc | |
parent | 0e8aec0c6f5f869b8aa52099965537d68b5bfd93 (diff) | |
download | pfsense-068b878421ec75c16ee0506327a199c06c24be62.zip pfsense-068b878421ec75c16ee0506327a199c06c24be62.tar.gz |
Have sync_all_package_configs_bootup() use the new package syncing code (it's tiny!) ;)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 18ab517..bac9c6b 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -562,42 +562,15 @@ function update_progress_bar($percent) { * This function also prints output to the terminal indicating progress. */ function resync_all_package_configs_bootup($show_message) { - global $config; - log_error("Resyncing configuration for all packages."); - if(!$config['installedpackages']['package']) return; - if($show_message == true) print "Syncing packages:"; - foreach($config['installedpackages']['package'] as $package) { - if(isset($pkg_config['nosync'])) continue; - if($show_message == true) print " " . $package['name']; - $error_message = ''; - if($pkg_config['custom_php_command_before_form'] <> "") { - if(php_check_syntax($pkg_config['custom_php_command_before_form'], $error_message) === true) { - eval($pkg_config['custom_php_command_before_form']); - } else { - print "(!)"; - continue; - } - } - if($pkg_config['custom_php_resync_config_command'] <> "") { - // if(php_check_syntax($pkg_config['custom_php_resync_config_command'], $error_message) === true) { - eval($pkg_config['custom_php_resync_config_command']); - // } else { - // print "(!)"; - // continue; - // } + global $config; + $i = 0; + log_error("Resyncing configuration for all packages."); + if(!$config['installedpackages']['package']) return; + if($show_message == true) print "Syncing packages:"; + foreach($config['installedpackages']['package'] as $package) { + if($show_message == true) print " " . $package['name']; + sync_package($i, true, true); } - $depends = get_pkg_depends($package['name'], ".xml", "files", 0); // Call dependency handler and do a little more error checking. - if(is_array($depends)) - foreach($depends as $item) { - $item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui"); - if (isset($item_config['nosync'])) continue; - 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 " " . $item_config['name']; - } - } if($show_message == true) print ".\n"; } @@ -862,7 +835,7 @@ if (!function_exists('php_check_syntax')){ } /* - * sync_package($pkg_name, $show_message) Force a package to setup its configuration and rc.d files. + * sync_package($pkg_name, $sync_depends = true, $show_message = false) Force a package to setup its configuration and rc.d files. */ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { global $config; |