aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/beam/common.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/beam/common.in b/lib/beam/common.in
index c23baf5..1d4dfd9 100644
--- a/lib/beam/common.in
+++ b/lib/beam/common.in
@@ -134,8 +134,19 @@ wtf() {
echo " $s $@"
}
+dry_mail() {
+ echo "============================================================="
+ cat -
+ echo "============================================================="
+}
+
# mail_report FILE
mail_report() {
+ : ${backup_mailer_program:=/usr/sbin/sendmail -oi -t -F $backup_sender_email}
+ if [ -n "$dry_run" ]; then
+ echo "Sending mail using $backup_mailer_program"
+ backup_mailer_program=dry_mail
+ fi
if [ -z "$backup_sender_email" ]; then
backup_sender_email=root@$(hostname)
fi
@@ -171,6 +182,5 @@ EOF
echo "$backup_report_intro"
fi
cat $report
-) | \
- ${backup_mailer_program:-/usr/sbin/sendmail -oi -t -F $backup_sender_email}
+) | $backup_mailer_program
}

Return to:

Send suggestions and report system problems to the System administrator.