Commit 2c8502e8 authored by Thomas De Schampheleire's avatar Thomas De Schampheleire Committed by Peter Korsgaard
Browse files

/etc/profile: read in /etc/profile.d/*.sh files



For custom projects, it is more maintainable to add custom profile settings
in a separate file, than directly in /etc/profile.

This patch modifies /etc/profile to read in *.sh files from /etc/profile.d/,
a technique commonly used in Linux distributions.

Signed-off-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent eb8f0522
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -46,3 +46,10 @@ if [ "$PS1" ]; then
    alias calc='calc -Cd '
    alias bc='calc -Cd '
fi;

# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done