]> git.pld-linux.org Git - projects/setup.git/commitdiff
Read /etc/profile.env if available (glen).
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 1 Apr 2008 07:27:16 +0000 (07:27 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 1 Apr 2008 07:27:16 +0000 (07:27 +0000)
Changed files:
    etc/profile -> 1.49

etc/profile

index 10df5f12be31bf173625e8682070956a6d923c37..bbf534e737a56d7cfe22005f84299454d26e38b2 100644 (file)
@@ -115,19 +115,24 @@ export PATH USER LOGNAME HOSTNAME HISTFILE HISTSIZE PS1 PS2
 # example:
 # cat /etc/env.d/VARIABLE
 # VARIABLE="value"
-for i in /etc/env.d/* ; do
-       NAME=`basename $i`
-       case $NAME in
-               *~ | *.bak | *.old | *.rpmnew | *.rpmsave )
-                       # nothing
-                       ;;
-               * )
-                       if [ -r $i ]; then
-                               . $i; export $NAME
-                       fi
-                       ;;
-       esac
-done
+if [ -f /etc/profile.env ]; then
+       . /etc/profile.env
+else
+       for i in /etc/env.d/* ; do
+               NAME=${i##*/}
+               case $NAME in
+                       *~ | *.bak | *.old | *.rpmnew | *.rpmsave )
+                               # nothing
+                               ;;
+                       * )
+                               if [ -r $i ]; then
+                                       . $i; export $NAME
+                               fi
+                               ;;
+               esac
+       done
+       unset NAME
+fi
 
 # Scripts:
 for i in /etc/profile.d/*.sh ; do
This page took 0.090907 seconds and 4 git commands to generate.