aboutsummaryrefslogtreecommitdiff
path: root/src/backupninja.in
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-11-29 10:09:43 +0000
committerintrigeri <intrigeri@boum.org>2005-11-29 10:09:43 +0000
commit285f38ac3154898fcc63d21a1eace97c851356d5 (patch)
tree8875fd73fb22483057102d848b713bf45a67695e /src/backupninja.in
parent5d63983704cf68acc3f6d0fe9b2e9c836078ec2c (diff)
downloadbackupninja-285f38ac3154898fcc63d21a1eace97c851356d5.tar.gz
backupninja-285f38ac3154898fcc63d21a1eace97c851356d5.tar.bz2
r3560@krups: intrigeri | 2005-11-15 15:13:35 +0100
backupninja now uses the maketemp function shared in lib/tools, instead of its own one.
Diffstat (limited to 'src/backupninja.in')
-rwxr-xr-xsrc/backupninja.in19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/backupninja.in b/src/backupninja.in
index 8f7bd03..2663457 100755
--- a/src/backupninja.in
+++ b/src/backupninja.in
@@ -131,22 +131,6 @@ function setsection() {
#
-# create a temporary file in a secure way.
-#
-function maketemp() {
- if [ -x /bin/mktemp ]
- then
- local tempfile=`mktemp /tmp/$1.XXXXXXXX`
- else
- DATE=`date`
- sectmp=`echo $DATE | /usr/bin/md5sum | cut -d- -f1`
- local tempfile=/tmp/$1.$sectmp
- fi
- echo $tempfile
-}
-
-
-#
# sets a global var with name equal to $1
# to the value of the configuration parameter $1
# $2 is the default.
@@ -488,6 +472,9 @@ if [ ! -d "$configdirectory" ]; then
fatal "Configuration directory '$configdirectory' not found."
fi
+# include shared functions
+. $libdir/tools
+
[ -f "$logfile" ] || touch $logfile
if [ "$UID" != "0" ]; then