base-files: add /etc/profile.d support
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 Sep 2015 08:32:13 +0000 (08:32 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 Sep 2015 08:32:13 +0000 (08:32 +0000)
commitf5b35b0edec41f4f5ce53e93f51740890a542fcf
treef83f92d16026b298d6ba048c8b2ce81e64e2b463
parentc5d4911448898f7fabdd2c4737ed0820ced4fc4d
base-files: add /etc/profile.d support

OpenWrt should support an optional /etc/profile.d directory like
most other Linux distributions. This allows packages to install
their own scripts into /etc/profile.d/ directory.

The file suffix should make clear, that these scripts
are (sourced) shell-snippets. If the user needs e.g. php or lua,
one must make sure that the interpreter is called.
The reverse failsafe test makes sure, that the effective returncode is 0.

A typcal usecase is the inclusion of private helpers,
special variables or aliases, which at the moment needs
patching the sourcecode and is not well maintainable.
Now the builder can simply add there files.

v1 initial work of Hendrik Lüth <hendrik@linux-nerds.de>
v2 changes regarding RFC (e.g. thomas.langer@lantiq.com)
v3 changes regarding RFC (e.g. mschiffer@universe-factory.net)
v4 keep it simple and mimic OpenWrt style

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46965 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/base-files/files/etc/profile