diff options
author | Sebastien Dupont <sdupont@mandriva.com> | 2002-01-16 20:53:49 +0000 |
---|---|---|
committer | Sebastien Dupont <sdupont@mandriva.com> | 2002-01-16 20:53:49 +0000 |
commit | 179f0238a5f3fa84aa9fe2829c7e5f1300647e35 (patch) | |
tree | 76e0df22dd9c28f9f6f01ddf3bde9c827c107c35 /perl-install/standalone/drakbackup | |
parent | f9607c705a39a18378d046fdc2daa34dcc8a11d9 (diff) | |
download | drakx-backup-do-not-use-179f0238a5f3fa84aa9fe2829c7e5f1300647e35.tar drakx-backup-do-not-use-179f0238a5f3fa84aa9fe2829c7e5f1300647e35.tar.gz drakx-backup-do-not-use-179f0238a5f3fa84aa9fe2829c7e5f1300647e35.tar.bz2 drakx-backup-do-not-use-179f0238a5f3fa84aa9fe2829c7e5f1300647e35.tar.xz drakx-backup-do-not-use-179f0238a5f3fa84aa9fe2829c7e5f1300647e35.zip |
update send mail.
(pixel mode. ;))
Diffstat (limited to 'perl-install/standalone/drakbackup')
-rwxr-xr-x | perl-install/standalone/drakbackup | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index e14eb44cc..8d1f97f5b 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -83,7 +83,7 @@ # 2 - calcul disk space. # use quota. # 3 - ssh & rsync -> expect or .identity.pub/authorized_keys -# 4 - write on cd +# 4 - write on cd --> ! change Joliet to HFS for Apple # 5 - cd writer detection -> cdrw: /sys/dev/cdrom/info /scsi/host0/bus0/target4/lun0 # /proc/sys/dev/cdrom/ # 6 - total backup.( all partitions wanted, windows partitions for example!) @@ -449,10 +449,14 @@ sub read_conf_file { sub complete_results { system_state(); - $daemon or $results .= _("\n********************* DrakBackup Report *********************\n\n"); - $daemon and $results .= _("\n**************** DrakBackup Daemon Report ********************\n\n"); + $daemon or $results .= _("***********************************************************************\n\n"); + $daemon or $results .= _("\n DrakBackup Report \n\n"); + $daemon and $results .= _("\n DrakBackup Daemon Report\n\n\n"); + $daemon or $results .= _("***********************************************************************\n\n"); $results .= $system_state; - $results .= _("\n\n****************** DrakBackup Report Details ****************\n\n"); + $daemon or $results .= _("\n\n***********************************************************************\n\n"); + $results .= _("\n DrakBackup Report Details\n\n\n"); + $daemon or $results .= _("***********************************************************************\n\n"); } @@ -477,8 +481,15 @@ sub ssh_client { sub send_mail { my ($result) = @_; - my $date_ = `date`; - system("mail $user_mail -s 'DrakBackup report on $date_' < $save_path/$result "); + my $datem = `date`; + + open F, "|/usr/sbin/sendmail -f$user_mail $user_mail" or die "fork: $!"; + print F "From: drakbackup\n"; + print F "To: $user_mail \n"; + print F "Subject: DrakBackup report on $datem \n"; + print F "\n"; + print F "$result\n"; + close F or die "sending: $!"; } sub build_backup_files { @@ -646,8 +657,9 @@ sub build_backup_files { } if (($where_cd && !$daemon) || ($daemon && $cd_daemon)) { } - output_p( $save_path . "/results/results$the_time", $results); - $send_mail and send_mail("/results/results$the_time"); +# output_p( $save_path . "/results/results$the_time", $results); +# $send_mail and send_mail("/results/results$the_time"); + $send_mail and send_mail("$results"); } sub list_remove { |