diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2011-12-24 13:35:30 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2011-12-24 13:35:30 +0000 |
commit | c45dafabedff5d90870a4acb7f7478f7f25fb204 (patch) | |
tree | 8af85f112317bae1dd65a7afd49b1bbe4bf49b5e /databases/autobackupmysql/files/patch-autobackupmysql.sh | |
parent | - remove duplicate -lwrap (diff) |
- Update to 1.4
- Honor custom LOCALBASE/PREFIX
PR: ports/163243
Submitted by: Frank Wall <fw@moov.de> (maintainer)
Notes
Notes:
svn path=/head/; revision=287965
Diffstat (limited to 'databases/autobackupmysql/files/patch-autobackupmysql.sh')
-rw-r--r-- | databases/autobackupmysql/files/patch-autobackupmysql.sh | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/databases/autobackupmysql/files/patch-autobackupmysql.sh b/databases/autobackupmysql/files/patch-autobackupmysql.sh index e9b2ba369219..60e732cbcb8f 100644 --- a/databases/autobackupmysql/files/patch-autobackupmysql.sh +++ b/databases/autobackupmysql/files/patch-autobackupmysql.sh @@ -1,20 +1,26 @@ ---- autobackupmysql.sh.orig 2009-12-21 15:25:29.000000000 +0100 -+++ autobackupmysql.sh 2009-12-21 16:07:01.000000000 +0100 +--- autobackupmysql.sh.orig 2009-12-18 13:23:34.000000000 +0100 ++++ autobackupmysql.sh 2011-12-13 13:18:11.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/local/bin/bash # # Automatic MySQL Backup Script # VER. 1.1 - http://sourceforge.net/projects/autobackupmysql/ -@@ -30,8 +30,8 @@ - # Check configuration files - if [ -f "autobackupmysql.conf" ] ; then - source "autobackupmysql.conf" --elif [ - f "/etc/autobackupmysql.conf" ] ; then -- source "/etc/autobackupmysql.conf" -+elif [ -f "/usr/local/etc/autobackupmysql.conf" ] ; then -+ source "/usr/local/etc/autobackupmysql.conf" - else - # Username to access the MySQL server e.g. dbuser - USERNAME='dbuser' - +@@ -292,6 +292,7 @@ + LOGERR=$BACKUPDIR/ERRORS_$DBHOST-`date +%N`.log # Logfile Name + BACKUPFILES="" + OPT="--quote-names --opt" # OPT string for use with mysqldump ( see man mysqldump ) ++UNAME_S="`uname -s | tr "[:upper:]" "[:lower:]"`" # identify operating system + + # Add --compress mysqldump option to $OPT + if [ "$COMMCOMP" = "yes" ]; +@@ -440,7 +441,8 @@ + # If DBs are excluded + for exclude in $DBEXCLUDE + do +- DBNAMES=`echo $DBNAMES | sed "s/\b$exclude\b//g"` ++ [ "$UNAME_S" = "linux" ] && DBNAMES=`echo $DBNAMES | sed "s/\b$exclude\b//g"` ++ [ "$UNAME_S" = "freebsd" ] && DBNAMES=`echo $DBNAMES | sed "s/[[:<:]]$exclude[[:>:]]//g"` + done + + MDBNAMES=$DBNAMES |