summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-02-26 11:34:19 -0500
committerjim-p <jimp@pfsense.org>2011-02-26 11:34:19 -0500
commit73d885d7c4fd6a9900fc59c7c6b9aabf5667ffb5 (patch)
treec6506377bc323f8b3f492c9c2408fdcf1504efbc /etc/phpshellsessions
parent17e7a243508c1c60a027716703a1bc7687ae0033 (diff)
downloadpfsense-73d885d7c4fd6a9900fc59c7c6b9aabf5667ffb5.zip
pfsense-73d885d7c4fd6a9900fc59c7c6b9aabf5667ffb5.tar.gz
Ensure the pkg staging area exists on nanobsd before trying to use it.
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r--etc/phpshellsessions/gitsync5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index aaca2c7..d0be7a1 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -29,7 +29,10 @@ if(!file_exists("/usr/local/bin/git")) {
echo "Cannot find git, fetching...";
if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
$pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ ";
- $pkgstaging = "-t /root/tmp/instmp.XXXXXX";
+ $pkgstagingdir = "/root/tmp";
+ if (!is_dir($pkgstagingdir))
+ mkdir($pkgstagingdir);
+ $pkgstaging = "-t {$pkgstagingdir}/instmp.XXXXXX";
}
system("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -r git");
}
OpenPOWER on IntegriCloud