diff options
author | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-02-22 14:31:34 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-02-22 14:31:34 -0500 |
commit | cfde64b8b85c1fa6730b0b1655be66f2b9df51de (patch) | |
tree | 1fc08ec9365953a6f011380e4c7fa0886e88a1ba /etc/inc/pkg-utils.inc | |
parent | 8cd294def19d9d678fc1e369bf549e3b489700c1 (diff) | |
download | pfsense-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.inc | 11 |
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(); |