linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] introduce etc/sysconfig/hotplug, move debug to the new file
Date: Sat, 07 Jun 2003 13:32:26 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-105499293405273@msgid-missing> (raw)

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

             reply	other threads:[~2003-06-07 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-07 13:32 Olaf Hering [this message]
2003-06-08  9:20 ` [PATCH] introduce etc/sysconfig/hotplug, move debug to the new file Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-105499293405273@msgid-missing \
    --to=olh@suse.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).