diff options
author | Yves Duret <yduret@mandriva.com> | 2002-03-14 12:25:43 +0000 |
---|---|---|
committer | Yves Duret <yduret@mandriva.com> | 2002-03-14 12:25:43 +0000 |
commit | 489e414002c5bbb0d0088290a0b953c331058ca4 (patch) | |
tree | f4ae04177cff1cc33cb3afef992ce3cb18ff9a45 /perl-install | |
parent | 9f8a425c5769da74bcb1acb023225a6750e2d5c2 (diff) | |
download | drakx-backup-do-not-use-489e414002c5bbb0d0088290a0b953c331058ca4.tar drakx-backup-do-not-use-489e414002c5bbb0d0088290a0b953c331058ca4.tar.gz drakx-backup-do-not-use-489e414002c5bbb0d0088290a0b953c331058ca4.tar.bz2 drakx-backup-do-not-use-489e414002c5bbb0d0088290a0b953c331058ca4.tar.xz drakx-backup-do-not-use-489e414002c5bbb0d0088290a0b953c331058ca4.zip |
fix * bug in field matching/ not matching
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/logdrake | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 1d1e1c871..3deb392d7 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -275,6 +275,8 @@ sub parse_file { my $ey = $e_yes->get_chars(0, -1); my $en = $e_no->get_chars(0, -1); $ey =~ s/ OR /\|/; + $ey =~ s/^\*$//; + $en =~ s/^\*$/.*/; $ey = $ey .($::Word) if ($::isWord); if ($cal_mode) { @@ -449,17 +451,30 @@ $r .= "Load is huge: $load\n" if ($load >@ . "$load);\n\n"; [ { label => "mail", val => \$mail, type => "bool", text => "mail output" }, { label => "email", val => \$email, disabled => sub { !$mail; }}, - { label => "smtp ??", val => \$smtp, disabled => sub { !$mail; } }, + #{ label => "smtp", val => \$smtp, disabled => sub { !$mail; } }, { label => "" }, { label => "sms output", val => \$sms, type => "bool", text => "You need to have smsend set up (works only for some countries)" }, { label => "smssend output", val => \$smssend , disabled => sub {!$sms;}}, ]) or goto step_load; #output("/etc/cron.hourly/logdrake_alert.pl", ($cron)); - $cron .= q@#- report it -print $r; -# EOF@; - print $cron; + $cron .= q@#- report it@; + if ($mail) { + $cron .= q! +open F, '|/usr/sbin/sendmail -oi -t'; + +print F +q(Subject: Mail Alert +From: root@localhost +To: ), "$email\n"; +print F $r; + +# EOF!; + } elsif ($sms) { + $in->do_pkgs->install('smssend'); + $cron .= q!`smssend !, $smssend, q! chomp_(`date`);! + } + undef $::isWizard; $::WizardWindow->destroy if defined $::WizardWindow; undef $::WizardWindow; @@ -530,6 +545,9 @@ sub destroy_window { # log # $Log$ +# Revision 1.14 2002/03/14 12:25:43 yduret +# fix * bug in field matching/ not matching +# # Revision 1.13 2002/03/05 06:56:27 yduret # mail alert: use eval {} to catch wizcancel # |