From 2c8502e8211d6153830929110611ce18956ae42c Mon Sep 17 00:00:00 2001 From: Thomas De Schampheleire Date: Wed, 19 Oct 2011 09:36:02 +0200 Subject: /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 Signed-off-by: Peter Korsgaard --- fs/skeleton/etc/profile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs') 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 -- cgit v1.2.3