#! /bin/sh -
#
# klog/rc.main
#
# Simple kernel log "daemon"
#

# Redirects the standard error to the standard output
exec 2>&1

TARGET="$1"
SVNAME="${2:-klog}"

start()
{
    echo "*** ${SVNAME}: Starting klog ..."
    while IFS= read -r line
    do
        echo "$line"
    done < /proc/kmsg
}

reset()
{
    echo "*** ${SVNAME}: Resetting"
    exit 0
}

# Branch to target
eval ${TARGET} "$@"

