summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>2011-10-19 09:36:02 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-10-28 14:59:27 +0200
commit2c8502e8211d6153830929110611ce18956ae42c (patch)
treea93ca57160e106c6e4e72214d21849cc33d197b5 /fs
parenteb8f0522f89c3f679fe73d1acff673110fe38107 (diff)
downloadbuildroot-novena-2c8502e8211d6153830929110611ce18956ae42c.tar.gz
buildroot-novena-2c8502e8211d6153830929110611ce18956ae42c.zip
/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: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/skeleton/etc/profile7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/skeleton/etc/profile b/fs/skeleton/etc/profile
index cc2e0beb8..31d3180c0 100644
--- a/fs/skeleton/etc/profile
+++ b/fs/skeleton/etc/profile
@@ -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