#!/bin/sh
#------------------------------------------------------------------------------
# OPT_EMBEDDED  /etc/rrdtool/alix.val                              __FLI4LVER__
# Creation:     2005-12-23 gdw
# Last Update:  $Id$
# 
# rrdtool alix Datenerfassung
#------------------------------------------------------------------------------

[ -z "$RDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf

local source=alix
eval local idx='$RRDTOOL_'$source'_ID'
eval local options='$RRDTOOL_'$idx'_OPTIONS_STRING'

for item in $options
do
    local db_file=$RRDTOOL_DB_PATH/$source/$item.rrd
    case "$item" in
    "temperature")
        . /var/run/embedded.conf
        
        i2c_get_temperature
        set `echo $temperature | sed -e 's#/# #'`
        cpu=$1
        pcb=$2
        rrdtool update $db_file \
        N:$cpu:$pcb
        ;;
    esac
done

