From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gioele Barabucci Date: Fri, 31 May 2002 10:14:52 +0000 Subject: [PATCH] run only wanted rc MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------Boundary-00=_SG0ZGUZ7C13N8KME2THZ" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org --------------Boundary-00=_SG0ZGUZ7C13N8KME2THZ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: inline 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 child3 -- Gioele Barabucci (Gb]) ) mailto:dev@gioelebarabucci.com ) http://www.gioelebarabucci.com ) ) I've been and now I've gone ) ) /Magic Pie^Oasis --------------Boundary-00=_SG0ZGUZ7C13N8KME2THZ Content-Type: text/x-diff; charset="us-ascii"; name=" " Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="indent.patch" ? indent.patch Index: hotplug =================================================================== RCS file: /cvsroot/linux-hotplug/admin/etc/rc.d/init.d/hotplug,v retrieving revision 1.2 diff -u -3 -p -r1.2 hotplug --- hotplug 23 Feb 2001 22:05:59 -0000 1.2 +++ hotplug 31 May 2002 10:04:19 -0000 @@ -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 + --------------Boundary-00=_SG0ZGUZ7C13N8KME2THZ-- _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel