summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
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 /etc/inc/pkg-utils.inc
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)
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc11
1 files changed, 11 insertions, 0 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();
OpenPOWER on IntegriCloud