File tree 1 file changed +10
-1
lines changed
1 file changed +10
-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
@@ -60,7 +65,11 @@ set -o pipefail
60
65
61
66
cleanup()
62
67
{
63
- find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f
68
+ <%- if @kernel == 'SunOS' -%>
69
+ gfind "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | gxargs -0 -r rm -f
70
+ <%- else -%>
71
+ find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f
72
+ <%- end -%>
64
73
}
65
74
66
75
<% if @delete_before_dump -%>
You can’t perform that action at this time.
0 commit comments