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

edgar.soldin at web.de edgar.soldin at web.de
Fri Sep 4 06:00:06 EDT 2015

On 04.09.2015 11:51, karlp wrote:
> include() {                                                  
>         local file                                                         
>         for file in $(ls $1/*.sh 2>/dev/null); do         
>                 . $file                          
>         done                                     
> }         

note from a bystander. this looks wrong - path/file names containing spaces will be delimited by for. probably better use

for i in "$1/*.sh"; do
    [ -e "$i" ] || continue
    some command "$i"

as explained on

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list