diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-07 03:33:44 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-07 03:33:44 +0000 |
commit | efd818695e58734fa45fb2952db228eb9695b96c (patch) | |
tree | b301844c9c9d86e1b0b824b3d3a932f9a10d1560 /usr/local/www/pkg_mgr_install.php | |
parent | dd12b6e29621e14209ee38beb6d79c8ebaa54e42 (diff) | |
download | pfsense-efd818695e58734fa45fb2952db228eb9695b96c.zip pfsense-efd818695e58734fa45fb2952db228eb9695b96c.tar.gz |
Add reinstall all packages. This needs to be tested.
Diffstat (limited to 'usr/local/www/pkg_mgr_install.php')
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index 456fe07..3ace850 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -97,19 +97,28 @@ include("fbegin.inc"); <?php -/* - * Loop through packages_to_install, installing needed packages - */ -install_package($_GET['id']); -update_status("Installation of {$_GET['id']} completed."); -$static_output .= "\n\nInstallation completed."; -update_output_window($static_output); +if($_GET['reinstallallpackages']) { + foreach($config['installedpackages']['package'] as $package) { + $todo[] = array($package['name'], $package['version']); + } + foreach($todo as $pkgtodo) { + delete_package($pkgtodo['name'] . '-' . $pkgtodo['version']); + delete_package_xml($pkgtodo['name']); + install_package($pkgtodo['name']); + } + update_status("All packages reinstalled."); + update_output_window("All packages reinstalled."); +} else { + install_package($_GET['id']); + update_status("Installation of {$_GET['id']} completed."); + $static_output .= "\n\nInstallation completed."; + update_output_window($static_output); +} // Delete all temporary package tarballs and staging areas. unlink_if_exists("/tmp/apkg_*"); rmdir_recursive("/var/tmp/instmp*"); - // close log fclose($fd_log); |