File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ ROTATE=<%= [ Integer(@backuprotate) - 1, 0 ].max %>
22
22
23
23
# Create temporary mysql cnf file.
24
24
TMPFILE=`mktemp /tmp/backup.XXXXXX` || exit 1
25
+ <%- if @kernel == 'SunOS' -%>
26
+ echo "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE
27
+ <%- else -%>
25
28
echo -e "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE
29
+ <%- end -%>
30
+
26
31
27
32
# Ensure backup directory exist.
28
33
mkdir -p $DIR
@@ -61,7 +66,7 @@ set -o pipefail
61
66
cleanup()
62
67
{
63
68
<%- if @kernel == 'SunOS' -%>
64
- gfind "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f
69
+ gfind "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | gxargs -0 -r rm -f
65
70
<%- else -%>
66
71
find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f
67
72
<%- end -%>
You can’t perform that action at this time.
0 commit comments