#!/bin/sh
#------------------------------------------------------------------------------
# /etc/rrdtool/soekris.val - rrdtool soekris Datenerfassung    __FLI4LVER__
#
# Creation:     23.12.2005 gdw
# Last Update:  $Id: soekris.val 10818 2006-01-10 22:33:25Z lanspezi $
#------------------------------------------------------------------------------
db_path=$1
shift
options=$*
for item in $options
do
    case "$item" in
    "voltage")
	value=`grep VPWR /proc/driver/soekris_voltage | cut -d" " -f2`
        rrdtool update $db_path/$item.rrd \
        N:$value
	;;
    "temperatur")
	value=`grep "Temp 2" /proc/driver/soekris_temp | cut -d" " -f4`
        rrdtool update $db_path/$item.rrd \
        N:$value
	;;
    esac
done
