From aa911553f2e400fb963c7d3fbd485cf01baac04c Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 20 Jul 2010 15:37:23 +0200 Subject: log messages to syslog --- rc.d/init.d/functions | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'rc.d/init.d/functions') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 15fc6415..04c8a494 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 $* +} -- cgit v1.2.1