diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-13 07:14:19 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-13 07:14:19 +0000 |
commit | fd63c6ef5a164be3d15607113500080cd58dfce1 (patch) | |
tree | 9ac054e8b9fc5cb8cb1febfd78bcbe541d5fcb70 /iurt2 | |
parent | 09d0bd09fe9e6d473f3a7496a306dea7b6c68062 (diff) | |
download | iurt-fd63c6ef5a164be3d15607113500080cd58dfce1.tar iurt-fd63c6ef5a164be3d15607113500080cd58dfce1.tar.gz iurt-fd63c6ef5a164be3d15607113500080cd58dfce1.tar.bz2 iurt-fd63c6ef5a164be3d15607113500080cd58dfce1.tar.xz iurt-fd63c6ef5a164be3d15607113500080cd58dfce1.zip |
Fix command execution failure check
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -425,7 +425,6 @@ sub fix_srpm_name { sub perform_command { my ($command, %opt) = @_; - # my ($command, $mail, $error, $hash, $die, $timeout, $cc, $log, $freq) = @_; $opt{timeout} ||= 300; $opt{freq} ||= 24; print "Timeout $opt{timeout}\n"; @@ -442,7 +441,7 @@ sub perform_command { } # FIXME process goes in defunct always, kill -14 should unsleep it, but not kill 9, $pid; - if ($? || $opt{error_regexp} ? $output =~ /$opt{error_regexp}/ : 1) { + if ($? || $opt{error_regexp} && $output =~ /$opt{error_regexp}/) { if ($opt{mail}) { if ($::warning->{$opt{hash}}{$my_arch}{$opt{mail}} % $opt{freq}) { sendmail($opt{mail}, $opt{cc} , $opt{error} , $output, 0, 0); |