From 827071b9f04cb56bcbd7b746763e1ba84dc5502c Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Mon, 27 Jun 2011 14:48:16 +1000 Subject: [PATCH] The PATH needs to be set before we try and get the location of the MySQL program, otherwise it might not be found. --- automysqlbackup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automysqlbackup.sh b/automysqlbackup.sh index bc615fd..3e7bd77 100755 --- a/automysqlbackup.sh +++ b/automysqlbackup.sh @@ -208,6 +208,7 @@ fi # # Full pathname to binaries to avoid problems with aliases and builtins etc. # +PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin WHICH="`which which`" AWK="`${WHICH} gawk`" LOGGER="`${WHICH} logger`" @@ -248,7 +249,6 @@ function get_debian_pw() { export LC_ALL=C PROGNAME=`${BASENAME} $0` -PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin DATE=`${DATEC} +%Y-%m-%d_%Hh%Mm` # Datestamp e.g 2002-09-21 DOW=`${DATEC} +%A` # Day of the week e.g. Monday DNOW=`${DATEC} +%u` # Day number of the week 1 to 7 where 1 represents Monday