diff options
author | jim-p <jimp@pfsense.org> | 2011-02-24 10:37:13 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-02-24 10:37:58 -0500 |
commit | 9011a843e8d66b610ae0ee129eefa183ed036e7a (patch) | |
tree | 7fc6127b171d9e989834597a8641848f4da340b6 /etc/inc/pkg-utils.inc | |
parent | 62958eae43864c873cbd92830d1a6bdb51746aa8 (diff) | |
download | pfsense-9011a843e8d66b610ae0ee129eefa183ed036e7a.zip pfsense-9011a843e8d66b610ae0ee129eefa183ed036e7a.tar.gz |
If we're on nanobsd, pass -t to pkg_add to specify a different "staging area" path.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 7cb4154..44ea36c 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -498,10 +498,12 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = } } } - if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) + if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) { $pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ "; + $pkgstaging = "-t /root/tmp/instmp.XXXXXX"; + } $pkgaddout = ""; - exec("{$pkgtmpdir}/usr/sbin/pkg_add -fv {$fetchto} 2>&1", $pkgaddout); + exec("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -fv {$fetchto} 2>&1", $pkgaddout); pkg_debug($pkgname . " " . print_r($pkgaddout, true) . "\npkg_add successfully completed.\n"); return true; |