Skip to content
Snippets Groups Projects
Commit a21b0685 authored by intrigeri's avatar intrigeri
Browse files

r4446@krups: intrigeri | 2006-04-08 12:28:59 +0200

 mysql handler: removed over-enthusiastic quote-escaping, related to su ;
 previous versions broke the mysql handler both on sarge and sid.
parent f83b7f0d
No related branches found
No related tags found
No related merge requests found
...@@ -179,10 +179,10 @@ then ...@@ -179,10 +179,10 @@ then
else else
execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir"
fi fi
debug 'su $user -c \"$execstr\"' debug 'su $user -c "$execstr"'
if [ ! $test ] if [ ! $test ]
then then
output=`su $user -c \"$execstr\" 2>&1` output=`su $user -c "$execstr" 2>&1`
code=$? code=$?
if [ "$code" == "0" ] if [ "$code" == "0" ]
then then
...@@ -202,10 +202,10 @@ then ...@@ -202,10 +202,10 @@ then
else else
execstr="$MYSQLHOTCOPY --allowold $db $hotdir" execstr="$MYSQLHOTCOPY --allowold $db $hotdir"
fi fi
debug 'su $user -c \"$execstr\"' debug 'su $user -c "$execstr"'
if [ ! $test ] if [ ! $test ]
then then
output=`su $user -c \"$execstr\" 2>&1` output=`su $user -c "$execstr" 2>&1`
code=$? code=$?
if [ "$code" == "0" ] if [ "$code" == "0" ]
then then
...@@ -231,13 +231,13 @@ then ...@@ -231,13 +231,13 @@ then
if [ $usevserver = yes ] if [ $usevserver = yes ]
then then
debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database' debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database'
databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database`
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
fatal "Authentication problem, maybe user/password is wrong" fatal "Authentication problem, maybe user/password is wrong"
fi fi
else else
databases=`echo 'show databases' | su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` databases=`echo 'show databases' | su $user -c "$MYSQL $defaultsfile" | grep -v Database`
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
fatal "Authentication problem, maybe user/password is wrong" fatal "Authentication problem, maybe user/password is wrong"
...@@ -253,10 +253,10 @@ fi ...@@ -253,10 +253,10 @@ fi
else else
execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql"
fi fi
debug 'su $user -c \"$execstr\"' debug 'su $user -c "$execstr"'
if [ ! $test ] if [ ! $test ]
then then
output=`su $user -c \"$execstr\" 2>&1` output=`su $user -c "$execstr" 2>&1`
code=$? code=$?
if [ "$code" == "0" ] if [ "$code" == "0" ]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment