linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] run only wanted rc
@ 2002-05-31 10:14 Gioele Barabucci
  0 siblings, 0 replies; 2+ messages in thread
From: Gioele Barabucci @ 2002-05-31 10:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

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



[-- Attachment #2: indent.patch --]
[-- Type: text/x-diff, Size: 1127 bytes --]

? 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
+

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] run only wanted rc
@ 2002-08-09 18:29 David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2002-08-09 18:29 UTC (permalink / raw)
  To: linux-hotplug

Gioele Barabucci wrote:
> 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.

Although this was in my queue, I decided not to merge it.  Execute bit
hacks are a fragile style, and "mv pc.rc pci.rc-" is more traditional
as a way to disable such a function.

- Dave




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-09 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-31 10:14 [PATCH] run only wanted rc Gioele Barabucci
  -- strict thread matches above, loose matches on Subject: below --
2002-08-09 18:29 David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).