From: Alan J. Pippin Date: Wed, 30 Jan 2008 15:00:32 +0000 (-0700) Subject: Made DBI connect changes suggested by Brett Williams. X-Git-Tag: release_0_2_0~1^2~12 X-Git-Url: http://git.pippins.net/embedvideo/.git/static/images/%7Beqpres_ppi_link%7D?a=commitdiff_plain;h=e78ac716347d97b0b3daa8c15ad3be42ce3e5d87;p=eq%2F.git Made DBI connect changes suggested by Brett Williams. --- diff --git a/bin/backup_phpgw_db b/bin/backup_phpgw_db index b00afda..beaf254 100755 --- a/bin/backup_phpgw_db +++ b/bin/backup_phpgw_db @@ -1,13 +1,14 @@ #!/bin/bash MNTPNT="/backup" +MOUNTIT=1 DSTDIR="/backup/mysql/" DBNAME=phpgroupware DBUSER=phpgroupware DBPASS=phpgroupware -mount -w -o remount $MNTPNT +[ $MOUNTIT == 1 ] && mount -w -o remount $MNTPNT /usr/bin/mysqldump --databases $DBNAME -u $DBUSER --password=$DBPASS -c > $DSTDIR/mysql_phpgw_backup.sql ls -l $DSTDIR/mysql_phpgw_backup.sql -mount -r -o remount $MNTPNT +[ $MOUNTIT == 1 ] && mount -r -o remount $MNTPNT diff --git a/bin/import_ward_data b/bin/import_ward_data index ef6d62b..53a3c3d 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -667,7 +667,7 @@ sub check_for_changed_ids ################################################### # Open a connection to the database -$dbh=DBI->connect("dbi:mysql:dbname=$dbname;host=$dbhost;port=$dbport",$dbuser,$dbpass,{ +$dbh=DBI->connect("dbi:mysql:dbname=$dbname:host=$dbhost:port=$dbport",$dbuser,$dbpass,{ AutoCommit=>0, PrintError=>0}) or print "Connect Failure:".$DBI::errstr."\n" and exit 2; diff --git a/bin/parse_ward_data b/bin/parse_ward_data index c2397cf..7a3c072 100755 --- a/bin/parse_ward_data +++ b/bin/parse_ward_data @@ -94,7 +94,7 @@ sub print_birthdays ################################################### # Open a connection to the database -$dbh=DBI->connect("dbi:mysql:dbname=$dbname;host=$dbhost;port=$dbport",$dbuser,$dbpass,{ +$dbh=DBI->connect("dbi:mysql:dbname=$dbname:host=$dbhost:port=$dbport",$dbuser,$dbpass,{ AutoCommit=>0, PrintError=>0}) or print "Connect Failure:".$DBI::errstr."\n" and exit 2;