/etc/profile: read in /etc/profile.d/*.sh files
PATCH 1/1 /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.
--- fs/skeleton/etc/profile | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
fs/skeleton/etc/profile +7 -0
@@ -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
PATCH 1/1 /etc/profile: read in /etc/profile.d/*.sh files
Quoted 22 lines · Thomas De Schampheleire
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/profileto read in *.sh files from/etc/profile.d/, a technique commonly used in Linux distributions.Signed-off-by Thomas De Schampheleire <[email protected]>---
?fs/skeleton/etc/profile | ?7 +++++++
?1 files changed, 7 insertions(+), 0 deletions(-)fs/skeleton/etc/profile +0
-0@@ -46,3 +46,10 @@ if [ "$PS1" ]; then? ? alias calc='calc -Cd '
? ? alias bc='calc -Cd '
?fi;
fs/skeleton/etc/profile if [ "$PS1" ]; then · line 55
Quoted 7 lines
fs/skeleton/etc/profile +7
-0+ +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + ? ?if [ -r "$i" ]; then + ? ? ? ?. $i + ? ?fi +done
bump
PATCH 1/1 /etc/profile: read in /etc/profile.d/*.sh files
In reply to Thomas De SchampheleireQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
Thomas> For custom projects, it is more maintainable to add custom Thomas> profile settings in a separate file, than directly in Thomas> /etc/profile.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard