From 58593b4f154acc781fb4edddd4498c726013a655 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 22 Jul 2010 15:02:28 +0200 Subject: [PATCH 1/3] echo_log - echo message and log it via syslog --- rc.d/init.d/functions | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 15fc641..04c8a49 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -766,3 +766,15 @@ init_crypto() { # A sed expression to filter out the files that is_ignored_file recognizes __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' + +# echo and log message to syslog with priority and tag +# echo_log +echo_log () { + local priority tag + + priority=$1 + tag=$2 + shift 2 + + echo $* && /usr/bin/logger -p $priority -t $tag $* +} -- 1.7.1