From: nbd Date: Wed, 28 Nov 2007 02:36:10 +0000 (+0000) Subject: init: don't start hotplug2 if it doesn't exist X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=0d9004633dc1ff1fcd9d817bc217263dc10dab5c;ds=sidebyside init: don't start hotplug2 if it doesn't exist The current init script always tries to start hotplug 2, even if it's not present, so we get an error on boot. This change checks for the presence of the hotplug2 binary before trying to start it. Signed-off-by: Jeremy Kerr git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9606 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index c0b61928c..b524c39c6 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -41,7 +41,8 @@ start() { ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe - /sbin/hotplug2 --override --persistent --max-children 1 --no-coldplug & + [ -x /sbin/hotplug2 ] && /sbin/hotplug2 --override --persistent \ + --max-children 1 --no-coldplug & # the coldplugging of network interfaces needs to happen later, so we do it manually here for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do