summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-18 03:12:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-18 03:12:36 +0000
commit5408fe23fb2cf3218a4e50d7f1fb7b1a1b020a23 (patch)
treee46500fe7edc0fce7607d2827a618c289c92bb33 /etc/inc/pkg-utils.inc
parenteb459ca03114571fc1dc3f72bfc7da19fe7feb69 (diff)
downloadpfsense-5408fe23fb2cf3218a4e50d7f1fb7b1a1b020a23.zip
pfsense-5408fe23fb2cf3218a4e50d7f1fb7b1a1b020a23.tar.gz
* Make sure platform variable is defined
* Make logic easier to read by simply testing for pfSense
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 28fee6c..0d0b348 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -39,11 +39,13 @@ require_once("pfsense-utils.inc");
require_once("globals.inc");
safe_mkdir("/var/db/pkg");
-if($g['platform'] <> "embedded" and $g['platform'] <> "cdrom") {
+$g['platform'] = trim(file_get_contents("/etc/platform"));
+if($g['platform'] == "pfSense") {
safe_mkdir("/usr/local/pkg");
safe_mkdir("/usr/local/pkg/pf");
}
+
/****f* pkg-utils/is_package_installed
* NAME
* is_package_installed - Check whether a package is installed.
OpenPOWER on IntegriCloud