]> git.pld-linux.org Git - packages/setup.git/commitdiff
- read /etc/profile.env if available
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 30 Apr 2006 11:25:12 +0000 (11:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    setup-profile.env.patch -> 1.1

setup-profile.env.patch [new file with mode: 0644]

diff --git a/setup-profile.env.patch b/setup-profile.env.patch
new file mode 100644 (file)
index 0000000..f8436be
--- /dev/null
@@ -0,0 +1,45 @@
+Index: profile
+===================================================================
+RCS file: /cvsroot/setup/etc/profile,v
+retrieving revision 1.48
+diff -u -r1.48 profile
+--- ./etc/profile      26 May 2005 18:27:14 -0000      1.48
++++ ./etc/profile      30 Apr 2006 11:23:40 -0000
+@@ -115,19 +115,24 @@
+ # 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.080492 seconds and 4 git commands to generate.