summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr_install.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-07 03:33:44 +0000
committerColin Smith <colin@pfsense.org>2005-06-07 03:33:44 +0000
commitefd818695e58734fa45fb2952db228eb9695b96c (patch)
treeb301844c9c9d86e1b0b824b3d3a932f9a10d1560 /usr/local/www/pkg_mgr_install.php
parentdd12b6e29621e14209ee38beb6d79c8ebaa54e42 (diff)
downloadpfsense-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-xusr/local/www/pkg_mgr_install.php25
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);
OpenPOWER on IntegriCloud