From 52095b7cf0cdc0df303c0fe0dd6fdb788a5fc156 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 16 Aug 2007 23:39:18 +0200 Subject: [PATCH] Update e-mail --- tools/list_ccollect_intervals.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/list_ccollect_intervals.sh b/tools/list_ccollect_intervals.sh index 463f9b4..2d51688 100755 --- a/tools/list_ccollect_intervals.sh +++ b/tools/list_ccollect_intervals.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Nico Schottelius +# Nico Schottelius # Date: 24-Jun-2006 # Last Modified: - # @@ -8,14 +8,22 @@ CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" -if [ ! -d "$CCOLLECT_INTERVALS" ]; then - echo "No intervals defined in $CCOLLECT_INTERVALS" - exit 23 +me="$(basename $0)" + +_echo() +{ + echo "$me> $@" +} + +if [ ! -d "${CCOLLECT_INTERVALS}" ]; then + _echo "No intervals defined in ${CCOLLECT_INTERVALS}" + exit 1 fi -cd "$CCOLLECT_INTERVALS" +set -e +cd "${CCOLLECT_INTERVALS}" for interval in *; do - eval int_$interval=$(cat $interval); - eval echo $interval: \$int_$interval; + eval int_${interval}=$(cat "${interval}"); + eval echo ${interval}: \$int_${interval}; done