diff options
-rw-r--r-- | etc/inc/pkg-utils.inc | 6 | ||||
-rw-r--r-- | etc/phpshellsessions/gitsync | 6 |
2 files changed, 8 insertions, 4 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; diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync index 22f8bfa..aaca2c7 100644 --- a/etc/phpshellsessions/gitsync +++ b/etc/phpshellsessions/gitsync @@ -27,9 +27,11 @@ unlink_if_exists("/tmp/config.cache"); if(!file_exists("/usr/local/bin/git")) { echo "Cannot find git, fetching..."; - if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) + if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) { $pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ "; - system("{$pkgtmpdir}/usr/sbin/pkg_add -r git"); + $pkgstaging = "-t /root/tmp/instmp.XXXXXX"; + } + system("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -r git"); } # Remove mainline if exists (older) |