From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Date: Sat, 07 Jun 2003 13:32:26 +0000 Subject: [PATCH] introduce etc/sysconfig/hotplug, move debug to the new file Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org This one introduces etc/sysconfig/hotplug and moves the DEBUG settings to this file. Index: etc/hotplug/net.agent =================================--- etc/hotplug/net.agent (revision 14) +++ etc/hotplug/net.agent (working copy) @@ -18,7 +18,6 @@ cd /etc/hotplug . hotplug.functions -# DEBUG=yes export DEBUG if [ "$INTERFACE" = "" ]; then mesg Bad NET invocation: \$INTERFACE is not set Index: etc/hotplug/ieee1394.agent =================================--- etc/hotplug/ieee1394.agent (revision 14) +++ etc/hotplug/ieee1394.agent (working copy) @@ -25,7 +25,6 @@ cd /etc/hotplug . hotplug.functions -# DEBUG=yes export DEBUG # generated by modutils 2.4.9 or later, for 2.4.10 and later kernels MAP_CURRENT=$MODULE_DIR/modules.ieee1394map Index: etc/hotplug/usb.agent =================================--- etc/hotplug/usb.agent (revision 14) +++ etc/hotplug/usb.agent (working copy) @@ -80,7 +80,6 @@ cd /etc/hotplug . hotplug.functions -# DEBUG=yes export DEBUG # generated by modutils, for current 2.4.x (and later) kernels MAP_CURRENT=$MODULE_DIR/modules.usbmap Index: etc/hotplug/hotplug.functions =================================--- etc/hotplug/hotplug.functions (revision 14) +++ etc/hotplug/hotplug.functions (working copy) @@ -10,7 +10,6 @@ # # -# DEBUG=yes; export DEBUG PATH=/bin:/sbin:/usr/sbin:/usr/bin KERNEL=`uname -r` @@ -43,7 +42,7 @@ fi debug_mesg () { - test "$DEBUG" = "" -o "$DEBUG" = no && return + test "$HOTPLUG_DEBUG" = "" -o "$HOTPLUG_DEBUG" = no && return mesg "$@" } Index: etc/hotplug.d/default/default.hotplug =================================--- etc/hotplug.d/default/default.hotplug (revision 14) +++ etc/hotplug.d/default/default.hotplug (working copy) @@ -26,8 +26,6 @@ cd /etc/hotplug . hotplug.functions -# DEBUG=yes export DEBUG - debug_mesg "arguments ($*) env (`env`)" # @@ -64,9 +62,7 @@ AGENT=/etc/hotplug/$1.agent if [ -x $AGENT ]; then shift - if [ "$DEBUG" != "" ]; then - mesg "invoke $AGENT ($@)" - fi + test "$HOTPLUG_DEBUG" = "" -o "$HOTPLUG_DEBUG" = no || mesg "invoke $AGENT ($@)" exec $AGENT "$@" mesg "couldn't exec $AGENT" exit 1 Index: etc/sysconfig/hotplug =================================--- etc/sysconfig/hotplug (working copy) +++ etc/sysconfig/hotplug (working copy) @@ -0,0 +1,5 @@ +##################################################################### +# +# Enable debugging for all hotplug actions? yes/no +# +HOTPLUG_DEBUG=no Index: Makefile =================================--- Makefile (revision 14) +++ Makefile (working copy) @@ -83,6 +83,7 @@ install: ${INSTALL_SCRIPT} -D sbin/hotplug $(sbindir)/hotplug + $(INSTALL) -d $(etcdir)/sysconfig $(INSTALL) -d $(etcdir)/hotplug/{usb,pci} $(INSTALL) -D etc/hotplug.d/default/default.hotplug $(etcdir)/hotplug.d/default/default.hotplug for F in etc/hotplug/{*.{agent,rc},hotplug.functions} ; do \ @@ -91,6 +92,7 @@ for F in etc/hotplug/{blacklist,usb.{user,hand,dist}map} ; do \ ${INSTALL_DATA} $$F $(etcdir)/hotplug ; \ done + @test -f $(etcdir)/sysconfig/hotplug || $(INSTALL)/etc/sysconfig/hotplug $(etcdir)/sysconfig/hotplug ${INSTALL_SCRIPT} -D etc/rc.d/init.d/hotplug $(etcdir)/init.d/hotplug $(INSTALL_DATA) -D hotplug.8 $(mandir)/man8/hotplug.8 $(INSTALL) -d $(prefix)/var/log/hotplug $(prefix)/var/run -- USB is for mice, FireWire is for men! ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ 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