tags 496384 + patch
thanks

Here is a patch  for this issue. I use a temporary  directory to let the
user find the backup file if needed.

--- bin/rrdedit.in~	2004-06-05 02:32:17.000000000 +0200
+++ bin/rrdedit.in	2008-08-27 20:57:49.000000000 +0200
@@ -24,17 +24,19 @@
   exit
 fi
 
+workdir="$(mktemp -d rrdedit.XXXXXXXXXX)"
+
 # dump it to temp
-$rrdtool dump $RRD_DIR/$1 > /tmp/$1.xml
+$rrdtool dump $RRD_DIR/$1 > "$workdir/$1.xml"
 
 # make a backup
-cp $RRD_DIR/$1 /tmp/$1.backup
+cp $RRD_DIR/$1 "$workdir/$1.backup"
 
 # edit the xml
-$editor /tmp/$1.xml
+$editor "$workdir/$1.xml"
 
 rm -f $RRD_DIR/$1
 
 # restore the rrd
-$rrdtool restore /tmp/$1.xml $RRD_DIR/$1
+$rrdtool restore "$workdir/$1.xml" $RRD_DIR/$1
 
I will do an  upload in the delayed queue with this  patch. Feel free to
cancel it and to upload your own version if needed.
-- 
NO ONE WANTS TO HEAR FROM MY ARMPITS
NO ONE WANTS TO HEAR FROM MY ARMPITS
NO ONE WANTS TO HEAR FROM MY ARMPITS
-+- Bart Simpson on chalkboard in episode 3F01

Reply via email to