1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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