summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr_install.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-03-10 22:34:46 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-03-10 22:35:30 -0400
commit16654db500a033fa812fe7f9f3459b00af46842a (patch)
treeaeaa8299851537085e08bde39fee3cab50e53f1d /usr/local/www/pkg_mgr_install.php
parentd145b6e8e5043347281e1f4655a8523f2990e341 (diff)
downloadpfsense-16654db500a033fa812fe7f9f3459b00af46842a.zip
pfsense-16654db500a033fa812fe7f9f3459b00af46842a.tar.gz
After package installation, redirect and show the installation
was OK. This has the side effect of reloading the menus so the package can be clicked on immediately.
Diffstat (limited to 'usr/local/www/pkg_mgr_install.php')
-rwxr-xr-xusr/local/www/pkg_mgr_install.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index 4ea6819..2cb0ebe 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -150,6 +150,17 @@ switch($_GET['mode']) {
start_service(htmlspecialchars($_GET['pkg']));
update_output_window($static_output);
break;
+ case "installedinfo":
+ $id = get_pkg_id(htmlspecialchars($_GET['pkg']));
+ if(file_exists("/tmp/{$_GET['pkg']}.info")) {
+ $filename = escapeshellcmd("/tmp/" . $_GET['pkg'] . ".info");
+ $status = file_get_contents($filename);
+ update_status($_GET['pkg'] . " installation completed.");
+ update_output_window($status);
+ } else {
+ update_output_window("Could not find {$_GET['pkg']}.");
+ }
+ break;
case "reinstallall":
if ($config['installedpackages']['package'])
exec("rm -rf /var/db/pkg/*");
@@ -177,15 +188,21 @@ switch($_GET['mode']) {
if($status == -1) {
update_status("Installation of " . htmlspecialchars($_GET['id']) . " FAILED!");
$static_output .= "\n\nInstallation halted.";
+ update_output_window($static_output);
} else {
- update_status("Installation of " . htmlspecialchars($_GET['id']) . " completed.");
+ $filename = escapeshellcmd("/tmp/" . $_GET['pkg'] . ".info");
+ $fd = fopen($filename, "w");
+ $status_a = "Installation of " . htmlspecialchars($_GET['id']) . " completed.";
+ update_status($status_a);
$status = get_after_install_info($_GET['id']);
if($status)
$static_output .= "\nInstallation completed.\n\n{$_GET['id']} setup instructions:\n\n{$status}";
else
$static_output .= "\nInstallation completed. Please check to make sure that the package is configured from the respective menu then start the package.";
+ fwrite($fd, $status_a . "\n\n". $static_output);
+ fclose($fd);
+ echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
}
- update_output_window($static_output);
}
// Delete all temporary package tarballs and staging areas.
OpenPOWER on IntegriCloud