Package: storebackup
Version: 1.19-4
Severity: minor
Tags: patch
Hi,
The /etc/cron.daily/storebackup file uses `mktemp` with no options to create a
temporary log file and fails to delete them
afterwards. This clutters /tmp with empty tmp.XXXXXXXXXX files and leaves the
user bedazzled.
Here is a patch that:
0) only creates the temporary file if config files do exist, as storebackup is
not going to run otherwise
1) creates it using the /tmp/storebackup.XXXXXXXXXX template
2) removes it when it is done
Thanks,
Guillaume Rischard
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (650, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages storebackup depends on:
ii bzip2 1.0.3-2 high-quality block-sorting file co
ii debianutils 2.16.1 Miscellaneous utilities specific t
ii perl 5.8.8-4 Larry Wall's Practical Extraction
storebackup recommends no packages.
-- no debconf information
--- /etc/cron.daily/storebackup 2006-06-12 23:32:07.000000000 +0200
+++ /etc/cron.daily/storebackup 2006-06-12 23:37:12.000000000 +0200
@@ -11,10 +11,11 @@
[ -x /usr/bin/storeBackup ] || exit 0
configs=`run-parts --list /etc/storebackup.d/`
-tmplog=`mktemp`
delayed_error=''
if [ "$configs" ]; then
+ tmplog=`mktemp -t storebackup.XXXXXXXXXX`
+
for file in $configs
do
if ! nice storeBackup -f "$file" > "$tmplog" 2>&1
@@ -25,6 +26,8 @@
fi
done
+ rm $tmplog
+
[ $delayed_error ] && exit 1;
fi