#!/bin/sh #------------------------------------------------------------------------------ # /etc/ppp/ip-up200.rrdtool # # Creation: bastard # Last Update: $Id$ #------------------------------------------------------------------------------ [ -z "$RRDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf # is a default-route-interface going up? if [ "$is_default_route" = "yes" ] then for idx in `seq 1 $RRDTOOL_N` do eval source='$RRDTOOL_'$idx'_SOURCE' eval options='$RRDTOOL_'$idx'_OPTIONS_STRING' if [ "$source" = "network" ] then for option in $options do if [ "$option" = "$real_interface" ] then # # Avoid huge peaks at dial # > /var/run/rrdtool.network.$real_interface rrdtool update $RRDTOOL_DB_PATH/network/$real_interface.rrd \ N:U:U if [ $? -eq "0" ] then rm /var/run/rrdtool.network.$real_interface fi fi done fi done fi