1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
diff -Naur backupninja-0.9.3.orig/handlers/mysql backupninja-0.9.3/handlers/mysql
--- backupninja-0.9.3.orig/handlers/mysql 2006-01-19 19:58:56.000000000 -0200
+++ backupninja-0.9.3/handlers/mysql 2006-09-19 10:30:32.000000000 -0300
@@ -24,7 +24,7 @@
local usevserver=no
local vroot
if [ $vservers_are_available = yes ]; then
- if [ -z "$vsname" ]; then
+ if [ ! -z "$vsname" ]; then
# does it exist ?
if ! vservers_exist "$vsname" ; then
fatal "The vserver given in vsname ($vsname) does not exist."
@@ -75,7 +75,7 @@
# 1. setting the user, so that /home/user/.my.cnf is used.
# 2. specifying the user and password in the handler config,
# which generates a temporary .my.cnf in /root/.my.cnf
-# 3. specify the config file with --defaults-file
+# 3. specify the config file with --defaults-extra-file
# (this option DOESN'T WORK WITH MYSQLHOTCOPY)
#
@@ -130,16 +130,16 @@
umask $oldmask
if [ $usevserver = yes ]
then
- defaultsfile="--defaults-file=$vhome/.my.cnf"
+ defaultsfile="--defaults-extra-file=$vhome/.my.cnf"
else
- defaultsfile="--defaults-file=$mycnf"
+ defaultsfile="--defaults-extra-file=$mycnf"
fi
fi
# if a user is not set, use $configfile, otherwise use $mycnf
if [ "$user" == "" ]; then
user=root;
- defaultsfile="--defaults-file=$configfile"
+ defaultsfile="--defaults-extra-file=$configfile"
else
userset=true;
if [ $usevserver = yes ]
@@ -160,7 +160,7 @@
debug "User home set to: $userhome"
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
- defaultsfile="--defaults-file=$vuserhome/.my.cnf"
+ defaultsfile="--defaults-extra-file=$vuserhome/.my.cnf"
debug "using $defaultsfile"
fi
diff -Naur backupninja-0.9.3.orig/handlers/rdiff backupninja-0.9.3/handlers/rdiff
--- backupninja-0.9.3.orig/handlers/rdiff 2006-01-31 15:35:46.000000000 -0200
+++ backupninja-0.9.3/handlers/rdiff 2006-09-19 10:34:09.000000000 -0300
@@ -17,8 +17,8 @@
fi
local user=$1
local host=$2
- debug "ssh -o PasswordAuthentication=no $host -l $user 'echo -n 1'"
- local ret=`ssh -o PasswordAuthentication=no $host -l $user 'echo -n host is alive'`
+ debug "ssh $sshoptions -o PasswordAuthentication=no $host -l $user 'echo -n 1'"
+ local ret=`ssh $sshoptions -o PasswordAuthentication=no $host -l $user 'echo -n host is alive'`
if echo $ret | grep "host is alive"; then
debug "Connected to $host as $user successfully"
else
@@ -36,8 +36,8 @@
else
local user=$1
local host=$2
- debug "ssh $host -l $user '$RDIFFBACKUP -V'"
- echo `ssh $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
+ debug "ssh $sshoptions $host -l $user '$RDIFFBACKUP -V'"
+ echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
fi
}
@@ -89,6 +89,7 @@
getconf type; desttype=$type
getconf user; destuser=$user
getconf host; desthost=$host
+getconf sshoptions
check_consistency "destination" "$type" "$user" "$host"
### CHECK CONFIG ###
diff -Naur backupninja-0.9.3.orig/src/backupninja.in backupninja-0.9.3/src/backupninja.in
--- backupninja-0.9.3.orig/src/backupninja.in 2006-01-17 20:22:52.000000000 -0200
+++ backupninja-0.9.3/src/backupninja.in 2006-09-19 10:30:32.000000000 -0300
@@ -500,7 +500,7 @@
echo ${messages[$i]}
done
echo -e "$errormsg"
- } | mail $reportemail -s "backupninja: $hostname $subject"
+ } | mail -s "backupninja: $hostname $subject" $reportemail
fi
if [ $actions_run != 0 ]; then
|