/usr/local/jetapps/usr/share/rear/lib
# # some functions to create an email # # note: All functions use the SAME mime boundary ! MIME_BOUNDARY=_---------_-$RANDOM$RANDOM$RANDOM$RANDOM # # produce the headers of a mime/multipart message # # parameters: # $1 = sender # $2 = subject # $3 $4 ... = recpients # function create_mime_mail_headers { from="$1" ; shift subject="$1" ; shift cat <<EOF From: <$from> $(for s in "$@" ; do echo "To: <$s>" ; done) Date: $(date) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="$MIME_BOUNDARY" MIME-Version: 1.0 Subject: $subject This is a multi-part message in MIME format. EOF } # # produce a text/plain mime part # # parameters: # STDIN = mail body text function create_mime_part_plain { echo "--$MIME_BOUNDARY" echo "Content-Transfer-Encoding: 7bit" echo "Content-Type: text/plain" echo cat echo } # produce an application/octet-stream mime part # # parameters # $1 = file to attach # function create_mime_part_binary { echo "--$MIME_BOUNDARY" echo "Content-Transfer-Encoding: base64" echo "Content-Type: application/octet-stream; name=\"$(basename "$1")\"" echo "Content-Disposition: attachment; filename=\"$(basename "$1")\"" echo perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' <"$1" StopIfError "perl MIME::Base64 failed" echo } # at the end of each an every email one has to put the mime ending ! function create_mime_ending { echo "--$MIME_BOUNDARY--" echo }
.
Edit
..
Edit
.shellcheckrc
Edit
_input-output-functions.sh
Edit
array-functions.sh
Edit
authtoken-functions.sh
Edit
bareos-functions.sh
Edit
bootloader-functions.sh
Edit
borg-functions.sh
Edit
checklayout-workflow.sh
Edit
columns-functions.sh
Edit
config-functions.sh
Edit
drlm-functions.sh
Edit
dump-workflow.sh
Edit
filesystems-functions.sh
Edit
finalizeonly-workflow.sh
Edit
format-workflow.sh
Edit
framework-functions.sh
Edit
global-functions.sh
Edit
help-workflow.sh
Edit
hp_raid-functions.sh
Edit
layout-functions.sh
Edit
layoutonly-workflow.sh
Edit
linux-functions.sh
Edit
mail-functions.sh
Edit
mkbackup-workflow.sh
Edit
mkbackuponly-workflow.sh
Edit
mkboot-workflow.sh
Edit
mkopalpba-workflow.sh
Edit
mkrescue-functions.sh
Edit
mkrescue-workflow.sh
Edit
mountonly-workflow.sh
Edit
network-functions.sh
Edit
opal-functions.sh
Edit
opaladmin-workflow.sh
Edit
output-functions.sh
Edit
progresssubsystem.nosh
Edit
rear-shell.bashrc
Edit
recover-workflow.sh
Edit
restoreonly-workflow.sh
Edit
rsync-functions.sh
Edit
savelayout-workflow.sh
Edit
serial-functions.sh
Edit
sesam-functions.sh
Edit
shell-workflow.sh
Edit
udev-workflow.sh
Edit
uefi-functions.sh
Edit
validate-workflow.sh
Edit
validated
Edit
write-protect-functions.sh
Edit