diff options
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -307,7 +307,19 @@ dump_rpmmacros("$chroot/home/builder/.rpmmacros") or die "FATAL iurt: could not my $unionfs_dir; if ($run{unionfs}) { # FIXME need to grep /proc/modules not ot try to load it if already loaded - system("sudo /sbin/modprobe -f unionfs"); + open my $modules, '/proc/modules'; + my $ok; + while (my $m = <$modules>) { + if ($m =~ /unionfs/) { + $ok = 1; + last + } + } + if (!$ok) { + print {$run{LOG}} "iurt: adding unionfs module\n" if $run{verbose} > 0; + system("sudo /sbin/depmod -a"); + system("sudo /sbin/modprobe -f unionfs"); + } $unionfs_dir = "$config->{local_home}/iurt_unionfs$debug_tag"; clean_all_unionfs($unionfs_dir); -d $unionfs_dir or mkdir $unionfs_dir @@ -924,7 +936,8 @@ sub perform_command { if ($err || $opt{error_regexp} && $output =~ /$opt{error_regexp}/) { if ($opt{mail} && $config->{sendmail} && !$config->{no_mail}{$opt{mail}}) { if (! ($cache->{warning}{$opt{hash}}{$opt{mail}} % $opt{freq})) { - sendmail($opt{mail}, $opt{cc} , $opt{error} , $output, 0, 0, $opt{debug_mail}); + my $cc = join ',', grep { !$config->{no_mail}{$_} } split ',', $opt{cc}; + sendmail($opt{mail}, $cc, $opt{error} , $output, 0, 0, $opt{debug_mail}); } elsif ($config->{admin}) { sendmail($config->{admin}, '' , $opt{error}, $output, 0, 0, $opt{debug_mail}); } @@ -980,6 +993,7 @@ sub dump_rpmmacros { \%distribution $config->{distribution} \%vendor $config->{vendor} \%packager $config->{packager}}; + close $f; -f $file or return 0; 1 } |