* fix for add_ds.sh to support new directory structure

This commit is contained in:
Manuel Kasper 2010-06-14 11:33:53 +00:00
parent 71df94921f
commit 06cafdafc0
2 changed files with 19 additions and 5 deletions

3
README
View File

@ -5,6 +5,9 @@ by Manuel Kasper, Monzoon Networks AG <mkasper@monzoon.net>
Changes
-------
v1.xx Fix add_ds.sh to support new directory structure
(contributed by Sergei Veltistov)
v1.31 Set memory_limit to 256 MB in PHP pages (suggested by Steve Colam
<steve@colam.co.uk>).

View File

@ -1,8 +1,19 @@
#!/bin/sh
for f in *.rrd; do
echo "file: $f"
mv $f $f.old
rrdtool dump $f.old | /path/to/add_ds_proc.pl | rrdtool restore - $f.new
mv $f.new $f
A=`ls -1`
for i in $A ; do
echo ""
echo "dir: $i"
echo ""
cd $i
for f in *.rrd; do
echo "file: $f"
mv $f $f.old
rrdtool dump $f.old | /path/to/add_ds_proc.pl | rrdtool restore - $f.new
mv $f.new $f
done
cd ../
done