]> git.pld-linux.org Git - projects/setup.git/commitdiff
- don't set TMPDIR to ~/tmp if it doesn't exist
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 9 Sep 2008 10:51:22 +0000 (10:51 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 9 Sep 2008 10:51:22 +0000 (10:51 +0000)
Changed files:
    etc/profile.d/tmp-dir.csh -> 1.6
    etc/profile.d/tmp-dir.sh -> 1.7

etc/profile.d/tmp-dir.csh
etc/profile.d/tmp-dir.sh

index 98af61bbce482d0b7dc0fed9768c165931a6aa83..85eb2c85d495c2d87a15c0528758b978ada895b9 100644 (file)
@@ -1,5 +1,10 @@
-if ( `/bin/id -u` >= 500 && ! -d ~/tmp ) then
+# create ~/tmp for normal users
+if ( `/bin/id -u` >= 1000 && ! -d ~/tmp ) then
        mkdir -p ~/tmp >& /dev/null
        chmod -f og-rwx ~/tmp >& /dev/null
 endif
-setenv TMPDIR ~/tmp
+
+# if any user has ~/tmp then use it
+if ( -d ~/tmp ) then
+       setenv TMPDIR ~/tmp
+endif
index 97993c08fd4a3e89e278700bcbf990240167afcf..a97b135f2f0304aab7b2062ec0fd818d3b1a9cc7 100644 (file)
@@ -1,6 +1,11 @@
-if [ $(/bin/id -u) -ge 500 -a ! -d ~/tmp ]; then
+# create ~/tmp for normal users
+if [ $(/bin/id -u) -ge 1000 -a ! -d ~/tmp ]; then
        mkdir -p ~/tmp > /dev/null 2>&1
        chmod -f og-rwx ~/tmp 2>/dev/null
 fi
-TMPDIR=~/tmp
-export TMPDIR
+
+# if any user has ~/tmp then use it
+if [ -d ~/tmp ]; then
+       TMPDIR=~/tmp
+       export TMPDIR
+fi
This page took 0.060066 seconds and 4 git commands to generate.