diff options
author | Renato Botelho <renato@netgate.com> | 2018-04-30 10:36:16 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2018-04-30 10:36:16 -0300 |
commit | b395c4f24ef42d242090e36651d901b7c84f7122 (patch) | |
tree | 8b976f6d73989736d12be99f9c5fc747d3185cb2 /src/etc/inc | |
parent | 88a8b4dacf162008cbbcc5a89c997a2271104e3e (diff) | |
download | pfsense-b395c4f24ef42d242090e36651d901b7c84f7122.zip pfsense-b395c4f24ef42d242090e36651d901b7c84f7122.tar.gz |
Add a global to keep valid meta package suffixes
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/globals.inc | 3 | ||||
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index b00b65d..93f55ce 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -89,7 +89,8 @@ $g = array( "default_timezone" => "Etc/UTC", "language" => "en_US", "default_config_backup_count" => 30, - "minimumtableentries_bogonsv6" => 400000 + "minimumtableentries_bogonsv6" => 400000, + "alternativemetaports" => array("vmware") ); /* IP TOS flags */ diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index 06c9c3d..4748ac8 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -1224,8 +1224,11 @@ function get_meta_pkg_name() { /* XXX: Use pkg annotation */ if (is_pkg_installed($g['product_name'])) { return $g['product_name']; - } else if (is_pkg_installed($g['product_name'] . '-vmware')) { - return $g['product_name'] . '-vmware'; + } + foreach ($g['alternativemetaports'] as $suffix) { + if (is_pkg_installed($g['product_name'] . '-' . $suffix)) { + return $g['product_name'] . '-' . $suffix; + } } return false; } |