aboutsummaryrefslogtreecommitdiffstats
path: root/mandriva/tmpdir.sh
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-10-21 01:28:48 +0100
committerColin Guthrie <colin@mageia.org>2011-10-21 10:10:39 +0100
commitbe75c98a06d569fbaa2d86f92676af961795d094 (patch)
treee2ce8ce7ffb97af34164634a3fbd8630dc7463e8 /mandriva/tmpdir.sh
parent4688ea25c9a5a87e48f89fc91a3c93a7c8c95b4a (diff)
downloadinitscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.gz
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.bz2
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.xz
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.zip
Add the mdkconf patch
Diffstat (limited to 'mandriva/tmpdir.sh')
-rw-r--r--mandriva/tmpdir.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/mandriva/tmpdir.sh b/mandriva/tmpdir.sh
new file mode 100644
index 00000000..d54bd0cd
--- /dev/null
+++ b/mandriva/tmpdir.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Id$
+# Set TMPDIR to ~/tmp and create it if directory not exist.
+
+if [ -f /etc/sysconfig/shell ];then
+ . /etc/sysconfig/shell
+fi
+
+if [[ "$SECURE_TMP" = "yes" ]];then
+ if [ -d ${HOME}/tmp -a -w ${HOME}/tmp ];then
+ export TMPDIR=${HOME}/tmp
+ export TMP=${HOME}/tmp
+ elif mkdir -p ${HOME}/tmp >/dev/null 2>&1;then
+ chmod 700 ${HOME}/tmp
+ export TMPDIR=${HOME}/tmp
+ export TMP=${HOME}/tmp
+ else
+ export TMPDIR=/tmp/
+ export TMP=/tmp/
+ fi
+else
+ export TMPDIR=/tmp/
+ export TMP=/tmp/
+fi