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

Matthias Schiffer mschiffer at universe-factory.net
Wed Jun 10 10:40:12 EDT 2015


On 06/10/2015 04:27 PM, Hendrik Lüth wrote:
> Am 10.06.2015 um 14:31 schrieb Bastian Bittorf:
>> * Matthias Schiffer <mschiffer at universe-factory.net> [10.06.2015 14:26]:
>>> Why should errors in these files cause login issues? This is shell and
>>> there's no -e, problematic lines will print an error and be skipped.
>> i have seen a lot of strange things. think about
>> flash readerrors or stack corruption or $youridea 8-)
>>
>> i think we can agree that we will not use a subshell,
>> but ignore profile.d in failsafe mode, ok? the 'sh -n'
>> thing is just a small 'insurance' - do you think it hurts/is too much?
>>
>> bye, bastian
> 
> I'd like to see, that the scripts in profile.d are getting called
> without the 'sh' because those scripts could be written in Lua, too.
> Weather a script needs to get called in failsafe mode or not depends on
> the script, so I'd like to not skip it.
> 
> regards, Hendrik

That's not at all what profile.d is about. profile.d is for shell
snippets that are *sourced* into the login shell, not executed, so they
must be shell code. If you want to call Lua scripts, just call Lua from
the shell code.

I agree that it would make sense to skip profile.d in failsafe mode.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150610/a9b5c909/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list