aboutsummaryrefslogtreecommitdiff
path: root/app/backup/backupninja
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2007-01-18 16:29:46 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2007-01-18 16:29:46 +0000
commit4a68ec40cf7a97fc3b99464002d66a202afb7a25 (patch)
treed423c2dfea3133aa7e5d0645f6144b3ec952ef08 /app/backup/backupninja
parentd84661bbae68da44a7e7d35da0c2bdd0ac819529 (diff)
downloadslackbuilds-4a68ec40cf7a97fc3b99464002d66a202afb7a25.tar.gz
slackbuilds-4a68ec40cf7a97fc3b99464002d66a202afb7a25.tar.bz2
backupninja: fixing a bug in mysql handler
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@986 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app/backup/backupninja')
-rw-r--r--app/backup/backupninja/backupninja-0.9.4.diff58
1 files changed, 52 insertions, 6 deletions
diff --git a/app/backup/backupninja/backupninja-0.9.4.diff b/app/backup/backupninja/backupninja-0.9.4.diff
index e1b48f1d..ea3a62bc 100644
--- a/app/backup/backupninja/backupninja-0.9.4.diff
+++ b/app/backup/backupninja/backupninja-0.9.4.diff
@@ -1,6 +1,6 @@
diff -Naur backupninja-0.9.4.orig/handlers/mysql backupninja-0.9.4/handlers/mysql
--- backupninja-0.9.4.orig/handlers/mysql 2006-10-07 01:45:20.000000000 -0300
-+++ backupninja-0.9.4/handlers/mysql 2007-01-18 14:00:38.000000000 -0200
++++ backupninja-0.9.4/handlers/mysql 2007-01-18 14:24:46.000000000 -0200
@@ -90,8 +90,7 @@
then
if [ $usevserver = yes ]
@@ -31,10 +31,10 @@ diff -Naur backupninja-0.9.4.orig/handlers/mysql backupninja-0.9.4/handlers/mysq
- tmpcnf="$home/my.cnf.disable"
- debug "mv $mycnf $tmpcnf"
- mv $mycnf $tmpcnf
-+ # rename temporarily
-+ tmpcnf="$workcnf.disable"
++ # rename temporarily
++ tmpcnf="$workcnf.disable"
+ debug "mv $workcnf $tmpcnf"
-+ mv $workcnf $tmpcnf
++ mv $workcnf $tmpcnf
fi
oldmask=`umask`
@@ -58,9 +58,55 @@ diff -Naur backupninja-0.9.4.orig/handlers/mysql backupninja-0.9.4/handlers/mysq
fi
# if a user is not set, use $configfile, otherwise use $mycnf
+@@ -144,22 +145,23 @@
+ userset=true;
+ if [ $usevserver = yes ]
+ then
+- vuserhome=`$VSERVER $vsname exec getent passwd "$user" | awk -F: '{print $6}'`
++ userhome=`$VSERVER $vsname exec getent passwd "$user" | awk -F: '{print $6}'`
+ if [ $? -eq 2 ]
+ then
+ fatal "User $user not found in /etc/passwd"
+ fi
+- userhome="$vroot$vuserhome"
++ debug "User home set to: $vroot$userhome"
++ [ -f $vroot$userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
+ else
+ userhome=`getent passwd "$user" | awk -F: '{print $6}'`
+ if [ $? -eq 2 ]
+ then
+ fatal "User $user not found in /etc/passwd"
+ fi
+- fi
++ debug "User home set to: $userhome"
++ [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
++ fi
+
+- debug "User home set to: $userhome"
+- [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
+ defaultsfile="--defaults-extra-file=$userhome/.my.cnf"
+ debug "using $defaultsfile"
+ fi
+@@ -282,12 +284,12 @@
+ if [ "$dbusername" != "" -a "$dbpassword" != "" ]
+ then
+ ## clean up tmp config file
+- debug "rm $mycnf"
+- rm $mycnf
++ debug "rm $workcnf"
++ rm $workcnf
+ if [ -f "$tmpcnf" ]
+ then
+- debug "mv $tmpcnf $mycnf"
+- mv $tmpcnf $mycnf
++ debug "mv $tmpcnf $workcnf"
++ mv $tmpcnf $workcnf
+ fi
+ fi
+
diff -Naur backupninja-0.9.4.orig/handlers/pgsql backupninja-0.9.4/handlers/pgsql
--- backupninja-0.9.4.orig/handlers/pgsql 2006-10-07 01:45:20.000000000 -0300
-+++ backupninja-0.9.4/handlers/pgsql 2007-01-18 13:41:41.000000000 -0200
++++ backupninja-0.9.4/handlers/pgsql 2007-01-18 14:09:22.000000000 -0200
@@ -64,10 +64,10 @@
if [ $usevserver = yes ]; then
pguid=`$VSERVER $vsname exec getent passwd $PGSQLUSER | awk -F: '{print $3}'`
@@ -116,7 +162,7 @@ diff -Naur backupninja-0.9.4.orig/handlers/pgsql backupninja-0.9.4/handlers/pgsq
debug "$execstr"
diff -Naur backupninja-0.9.4.orig/src/backupninja.in backupninja-0.9.4/src/backupninja.in
--- backupninja-0.9.4.orig/src/backupninja.in 2006-10-07 01:45:20.000000000 -0300
-+++ backupninja-0.9.4/src/backupninja.in 2007-01-18 13:41:41.000000000 -0200
++++ backupninja-0.9.4/src/backupninja.in 2007-01-18 14:09:22.000000000 -0200
@@ -442,6 +442,7 @@
getconf MYSQLDUMP /usr/bin/mysqldump
getconf PGSQLDUMP /usr/bin/pg_dump