init: check permissions on rc.d files
[openwrt.git] / package / base-files / files / etc / init.d / rcS
index 61c1d6d..b44f441 100755 (executable)
@@ -3,6 +3,6 @@
 
 {
        for i in /etc/rc.d/$1*; do
-               $i $2 2>&1
+               [ -x $i ] && $i $2 2>&1
        done 
 } | logger -s -p 6 -t '' &