summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-02-22 14:31:34 -0500
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-02-22 14:31:34 -0500
commitcfde64b8b85c1fa6730b0b1655be66f2b9df51de (patch)
tree1fc08ec9365953a6f011380e4c7fa0886e88a1ba
parent8cd294def19d9d678fc1e369bf549e3b489700c1 (diff)
downloadpfsense-cfde64b8b85c1fa6730b0b1655be66f2b9df51de.zip
pfsense-cfde64b8b85c1fa6730b0b1655be66f2b9df51de.tar.gz
* Add get_after_install_info()
* Show installation instructions for package if they exist (after_install_info)
-rw-r--r--etc/inc/pkg-utils.inc11
-rwxr-xr-xusr/local/www/pkg_mgr_install.php6
2 files changed, 16 insertions, 1 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 42f58ca..aceeb07 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -442,6 +442,17 @@ function install_package($package, $pkg_info = "") {
$restart_sync = true;
}
+function get_after_install_info($package) {
+ global $pkg_info;
+ /* fetch package information if needed */
+ if(!$pkg_info or !is_array($pkg_info[$package])) {
+ $pkg_info = get_pkg_info(array($package));
+ $pkg_info = $pkg_info[$package]; // We're only dealing with one package, so we can strip away the extra array.
+ }
+ if($pkg_info['after_install_info'])
+ return $pkg_info['after_install_info'];
+}
+
function eval_once($toeval) {
global $evaled;
if(!$evaled) $evaled = array();
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index 603ff3f..4ea6819 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -179,7 +179,11 @@ switch($_GET['mode']) {
$static_output .= "\n\nInstallation halted.";
} else {
update_status("Installation of " . htmlspecialchars($_GET['id']) . " completed.");
- $static_output .= "\n\nInstallation completed. Please check to make sure that the package is configured from the respective menu then start the package.";
+ $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.";
}
update_output_window($static_output);
}
OpenPOWER on IntegriCloud