Explorar o código

ktest.pl: Use run_command to execute sending mail

Instead of open coding system() call, use run_command which will log the
sending of email as well.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Steven Rostedt (VMware) %!s(int64=7) %!d(string=hai) anos
pai
achega
59f89eb1e3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      tools/testing/ktest/ktest.pl

+ 2 - 2
tools/testing/ktest/ktest.pl

@@ -4135,12 +4135,12 @@ sub set_test_option {
 
 
 sub _mailx_send {
 sub _mailx_send {
     my ($subject, $message) = @_;
     my ($subject, $message) = @_;
-    system("$mail_path/$mailer -s \'$subject\' $mailto <<< \'$message\'");
+    run_command "$mail_path/$mailer -s \'$subject\' $mailto <<< \'$message\'";
 }
 }
 
 
 sub _sendmail_send {
 sub _sendmail_send {
     my ($subject, $message) = @_;
     my ($subject, $message) = @_;
-    system("echo -e \"Subject: $subject\n\n$message\" | $mail_path/sendmail -t $mailto");
+    run_command "echo \'Subject: $subject\n\n$message\' | $mail_path/sendmail -t $mailto";
 }
 }
 
 
 sub find_mailer {
 sub find_mailer {