linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dynamic logger binary
@ 2003-06-06 17:46 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2003-06-06 17:46 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-06 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 17:46 [PATCH] dynamic logger binary Olaf Hering

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).