* Felix Fietkau <n...@openwrt.org> [10.11.2013 16:24]: > > if there are no files, than the call is e.g.: > > > > command . /etc/hotplug.d/iface/* > > > > (which throws an error, but does not hurt). the call > I'd prefer preventing unnecessary logspam. > > > test -f $file && . $file > > > > is racy anyway. just use 'command' than, it tests for > > existence itself 8-) > How is it racy? /etc/hotplug.d/* doesn't usually change at run time.
normally not, the intentention was more to simplify and dont test 2 times. what about: for FILE in /etc/hotplug.d/iface/*; do ( . "$FILE" 2>/dev/null ); done also: why is this needed?: export HOTPLUG_TYPE="$1" because we source everything, we dont need an export, just an: HOTPLUG_TYPE="$1" bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel