setup: etc/profile Read /etc/profile.env if available (glen).

arekm arekm at pld-linux.org
Tue Apr 1 09:27:21 CEST 2008


Author: arekm                        Date: Tue Apr  1 07:27:21 2008 GMT
Module: setup                         Tag: HEAD
---- Log message:
Read /etc/profile.env if available (glen).

---- Files affected:
setup/etc:
   profile (1.48 -> 1.49) 

---- Diffs:

================================================================
Index: setup/etc/profile
diff -u setup/etc/profile:1.48 setup/etc/profile:1.49
--- setup/etc/profile:1.48	Thu May 26 20:27:14 2005
+++ setup/etc/profile	Tue Apr  1 09:27:16 2008
@@ -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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/setup/etc/profile?r1=1.48&r2=1.49&f=u



More information about the pld-cvs-commit mailing list