summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr_install.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-11-16 19:40:20 +0000
committerErmal <eri@pfsense.org>2010-11-16 19:40:20 +0000
commitfcf92daec2d391bcc6f5e154b13195934acbf304 (patch)
treefdca7bb31d094108233dc642b9bb35e6d8ee0edb /usr/local/www/pkg_mgr_install.php
parent55910da79840bc37e6001e323de3e7900c3175d1 (diff)
downloadpfsense-fcf92daec2d391bcc6f5e154b13195934acbf304.zip
pfsense-fcf92daec2d391bcc6f5e154b13195934acbf304.tar.gz
* Use pkg_info -E pkgname* for testing if a package is installed.
* Do not call eval if we cannot include an .inc file since that will make the whole script fail. * Keep the log from the start to the end without overwriting. This makes debugging and problem reporting easy and explains what is done during installation. * Check retrun value of download_with_progress_bar to make it possible catching errors during download. * Lots of improvements in between Related to Ticket #950
Diffstat (limited to 'usr/local/www/pkg_mgr_install.php')
-rwxr-xr-xusr/local/www/pkg_mgr_install.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index 5c6ae56..289e58a 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -145,11 +145,11 @@ switch($_GET['mode']) {
delete_package_xml(htmlspecialchars($_GET['pkg']));
if (install_package(htmlspecialchars($_GET['pkg'])) < 0) {
update_status(gettext("Package reinstallation failed."));
- $static_output .= "\n\n" . gettext("Package reinstallation failed.");
+ $static_output .= "\n" . gettext("Package reinstallation failed.");
update_output_window($static_output);
} else {
update_status(gettext("Package reinstalled."));
- $static_output .= "\n\n" . gettext("Package reinstalled.");
+ $static_output .= "\n" . gettext("Package reinstalled.");
update_output_window($static_output);
filter_configure();
}
@@ -180,7 +180,7 @@ switch($_GET['mode']) {
}
}
update_status(gettext("All packages reinstalled."));
- $static_output .= "\n\n" . gettext("All packages reinstalled.");
+ $static_output .= "\n" . gettext("All packages reinstalled.");
update_output_window($static_output);
filter_configure();
break;
@@ -188,7 +188,7 @@ switch($_GET['mode']) {
$status = install_package(htmlspecialchars($_GET['id']));
if($status == -1) {
update_status(gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("FAILED!"));
- $static_output .= "\n\n" . gettext("Installation halted.");
+ $static_output .= "\n" . gettext("Installation halted.");
update_output_window($static_output);
} else {
$filename = escapeshellcmd("/tmp/" . $_GET['id'] . ".info");
@@ -197,10 +197,10 @@ switch($_GET['mode']) {
update_status($status_a);
$status = get_after_install_info($_GET['id']);
if($status)
- $static_output .= "\n" . gettext("Installation completed.") . "\n\n{$_GET['id']} " . gettext("setup instructions") . ":\n\n{$status}";
+ $static_output .= "\n" . gettext("Installation completed.") . "\n{$_GET['id']} " . gettext("setup instructions") . ":\n{$status}";
else
$static_output .= "\n" . gettext("Installation 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);
+ fwrite($fd, $status_a . "\n". $static_output);
fclose($fd);
echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
}
OpenPOWER on IntegriCloud