diff options
Diffstat (limited to 'app-admin/metalog/files/consolelog.sh')
-rw-r--r-- | app-admin/metalog/files/consolelog.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app-admin/metalog/files/consolelog.sh b/app-admin/metalog/files/consolelog.sh new file mode 100644 index 00000000000..90fb38e9921 --- /dev/null +++ b/app-admin/metalog/files/consolelog.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# consolelog.sh +# For metalog -- log to a console + +set -f + +. /etc/conf.d/metalog +if [ -z "${CONSOLE}" ] ; then + CONSOLE="/dev/console" +fi + +if [ -z "${FORMAT}" ] ; then + FORMAT='$1 [$2] $3' +fi + +for d in ${CONSOLE} ; do + eval echo ${FORMAT} > ${d} +done + +exit 0 |