run only wanted rc
PATCH 1/1 run only wanted rc
This patch make hotplug run only .rc files that are executable. In my sistem I use to do chmod -x pci.rc so I avoid complains about pci at boot time.
PS.: hotplug project is using GNU indentation[1]? it seems so, the patch corrects also indentation.
[1] 4 spaces for odd indentation and 1 tab each even indentation Ex.:
base-statement
child1
child2
child2-1
child2-1-1
child2-1-2
child3Signature · 5 lines
Gioele Barabucci (Gb]) ) mailto:[email protected] ) http://www.gioelebarabucci.com ) ) I've been and now I've gone ) ) /Magic Pie^Oasis
? indent.patch
Index: hotplug
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/rc.d/init.d/hotplug,v retrieving revision 1.2
hotplug +14 -11
@@ -13,29 +13,32 @@ # source function library if [ -f /etc/init.d/functions ]; then - . /etc/init.d/functions + . /etc/init.d/functions elif [ -f /etc/rc.d/init.d/functions ]; then - . /etc/rc.d/init.d/functions + . /etc/rc.d/init.d/functions fi case "$1" in start|restart|status) - for RC in /etc/hotplug/*.rc - do - $RC $1 + for RC in /etc/hotplug/*.rc; do + if [ -x $RC ]; then + $RC $1 + fi done touch /var/lock/subsys/hotplug ;; stop) - for RC in /etc/hotplug/*.rc - do - $RC stop - done - rm -f /var/lock/subsys/hotplug - ;; + for RC in /etc/hotplug/*.rc; do + if [ -x $RC ]; then + $RC stop + fi + done + rm -f /var/lock/subsys/hotplug + ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 ;; esac +