diff options
Diffstat (limited to 'mandriva/tmpdir.csh')
-rw-r--r-- | mandriva/tmpdir.csh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mandriva/tmpdir.csh b/mandriva/tmpdir.csh new file mode 100644 index 00000000..a2cc08da --- /dev/null +++ b/mandriva/tmpdir.csh @@ -0,0 +1,25 @@ +# $Id$ +# Set TMPDIR and TMP + +if (-f /etc/sysconfig/shell) then + eval `cat /etc/sysconfig/shell | grep -v ^# | sed -re 's/^([^=]+=)/set \1/'` +endif + +if ($?SECURE_TMP) then + if ($SECURE_TMP == "yes") then + if ( -d ${HOME}/tmp && -w ${HOME}/tmp ) then + setenv TMPDIR ${HOME}/tmp + setenv TMP ${HOME}/tmp + exit + endif + + if ( { mkdir -p ${HOME}/tmp >&! /dev/null } ) then + setenv TMPDIR ${HOME}/tmp + setenv TMP ${HOME}/tmp + exit + endif + endif +endif + +setenv TMPDIR /tmp +setenv TMP /tmp |