[OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support

Bastian Bittorf bittorf at bluebottle.com
Wed Jun 10 08:01:26 EDT 2015

* thomas.langer at lantiq.com <thomas.langer at lantiq.com> [10.06.2015 13:59]:
> I think this will not work, as /etc/profile (and these additional files) is expected to be executed in the current shell context.
> Otherwise adding shell variables or extending $PATH will not work. So you cannot execute them in a subshell.

ok, then please:
[ -e "$FILE" ] && sh -n "$FILE" && . "$FILE"

> Maybe it is possible to skip this for FAILSAFE mode? If there are errors, they can be corrected in this way.

this is a good point:

[ -z "$FAILSAFE" ] && {

bye, bastian
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list