Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc add test for /usr/bin/logger in warn/err.
details: https://anonhg.NetBSD.org/src/rev/79ab0f643f04
branches: trunk
changeset: 534419:79ab0f643f04
user: grant <grant%NetBSD.org@localhost>
date: Thu Jul 25 14:34:46 2002 +0000
description:
add test for /usr/bin/logger in warn/err.
diffstat:
etc/rc.subr | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 739a633e0918 -r 79ab0f643f04 etc/rc.subr
--- a/etc/rc.subr Thu Jul 25 14:31:10 2002 +0000
+++ b/etc/rc.subr Thu Jul 25 14:34:46 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.50 2002/07/08 16:14:54 atatat Exp $
+# $NetBSD: rc.subr,v 1.51 2002/07/25 14:34:46 grant Exp $
#
# Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -764,7 +764,9 @@
exitval=$1
shift
- logger "$0: ERROR: $*"
+ if [ -x /usr/bin/logger ]; then
+ logger "$0: ERROR: $*"
+ fi
echo 1>&2 "$0: ERROR: $*"
exit $exitval
}
@@ -775,7 +777,9 @@
#
warn()
{
- logger "$0: WARNING: $*"
+ if [ -x /usr/bin/logger ]; then
+ logger "$0: WARNING: $*"
+ fi
echo 1>&2 "$0: WARNING: $*"
}
Home |
Main Index |
Thread Index |
Old Index