Existing code in automysqlbackup.sh.2.5 to set up and restore redirection
of stdout and stderr...
--------------------------
# IO redirection for logging.
touch $LOGFILE
exec 6>&1 # Link file descriptor #6 with stdout.
# Saves stdout.
exec > $LOGFILE # stdout replaced with file $LOGFILE.
touch $LOGERR
exec 7>&2 # Link file descriptor #7 with stderr.
# Saves stderr.
exec 2> $LOGERR # stderr replaced with file $LOGERR.
--------------------------
#Clean up IO redirection
exec 1>&6 6>&- # Restore stdout and close file descriptor #6.
exec 1>&7 7>&- # Restore stdout and close file descriptor #7.
--------------------------
The last line looks like a "cut & paste code" error.
I'm supposing the intention is to restore stderr, and should be
exec 2>&7 7>&- # Restore stderr and close file descriptor #7.
Mind you, I've never run this script (in any form), so please consider the
implications for yourself before making any changes!
-spxl
Nobody/Anonymous
None
None
Public