base-files: hotplug-call: exit success when dir is absent
[openwrt/staging/rmilecki.git] / package / base-files / files / sbin / hotplug-call
index 28e957c3982ae070c7e8729410f45f160ea8b6a4..f595b9e75fa958ca6ade484134e625050bd8c7d5 100755 (executable)
@@ -11,8 +11,8 @@ USER=root
 export PATH LOGNAME USER
 export DEVICENAME="${DEVPATH##*/}"
 
-[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
+if [ \! -z "$1" -a -d /etc/hotplug.d/$1 ]; then
        for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
                [ -f $script ] && . $script
        ); done
-}
+fi