From fadaa82e81840ea33cc8c228f743636fbee1b345 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 28 Nov 2007 02:36:14 +0000 Subject: [PATCH] init: check permissions on rc.d files We try to unconditionally execute /etc/rc.d/* files, even if they're not executable - an easy way of temproarily disabling a service. When this happens, we get a permission denied error on boot. This change only tries to run execulable startup scripts. Signed-off-by: Jeremy Kerr git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9607 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/init.d/rcS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/etc/init.d/rcS b/package/base-files/files/etc/init.d/rcS index 61c1d6dab..b44f441c1 100755 --- a/package/base-files/files/etc/init.d/rcS +++ b/package/base-files/files/etc/init.d/rcS @@ -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 '' &