]> git.pld-linux.org Git - projects/setup.git/blobdiff - etc/profile
- 2.4.6 - basic /etc/env.d support. Simple way to manage system variables.
[projects/setup.git] / etc / profile
index 8621dc18a45d426b51b30c38454760fa46dc285e..f2247ae0c21329a72ab499588ead74cdff08bea3 100644 (file)
@@ -20,12 +20,6 @@ LOGNAME=$USER
 HOSTNAME=`/bin/uname -n`
 HISTFILE="$HOME/.history"
 HISTSIZE=1000
-HISTFILESIZE=1000
-
-# home_etc user config-dirs
-#CONFIG_DIR=etc
-#HOME_ETC=$HOME/$CONFIG_DIR
-#export CONFIG_DIR HOME_ETC
 
 #
 # Setup the environment for various shells
@@ -134,8 +128,27 @@ case "$SH" in
 esac
 
 unset SH
-export PATH USER LOGNAME HOSTNAME HISTFILE HISTSIZE HISTFILESIZE PS1 PS2
+export PATH USER LOGNAME HOSTNAME HISTFILE HISTSIZE PS1 PS2
+
+# Put all of the variables as files in /etc/env.d/
+# 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
 
+# Scripts:
 for i in /etc/profile.d/*.sh ; do
        if [ -x $i ]; then
                . $i
This page took 0.026544 seconds and 4 git commands to generate.