All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] dynamic logger binary
Date: Fri, 06 Jun 2003 17:46:32 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-105492177723646@msgid-missing> (raw)

Hi,

we have the logger in /bin ...
log also the pid to tracing.

Index: etc/hotplug/hotplug.functions
=================================RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v
retrieving revision 1.17
diff -u -r1.17 hotplug.functions
--- etc/hotplug/hotplug.functions	3 Dec 2002 02:24:03 -0000	1.17
+++ etc/hotplug/hotplug.functions	6 Jun 2003 13:49:07 -0000
@@ -22,16 +21,23 @@
     . /etc/sysconfig/hotplug
 fi
 
+if [ -x /usr/bin/logger ]; then
+    LOGGER=/usr/bin/logger
+elif [ -x /bin/logger ]; then
+    LOGGER=/bin/logger
+else
+    unset LOGGER
+fi
 #
 # for diagnostics
 #
-if [ -t -o ! -x /usr/bin/logger ]; then
+if [ -t -o -z "$LOGGER" ]; then
     mesg () {
 	echo "$@"
     }
 else
     mesg () {
-	/usr/bin/logger -t $(basename $0) "$@"
+	$LOGGER -t $(basename $0)"[$$]" "$@"
     }
 fi
 

-- 
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-06 17:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-105492177723646@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.