aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-01-18 13:16:28 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-01-18 13:16:28 +0000
commitbb559b58b6c97b47b9051e78c933bd1a076d9787 (patch)
treefa2e83d1d07aac010c36bf1436ccaf729d2b54de
parent0d32176a58601f200fe1a5b6a9fda04a44222fe8 (diff)
downloadiurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar
iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.gz
iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.bz2
iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.xz
iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.zip
- Fix --log option
-rwxr-xr-xiurt27
1 files changed, 4 insertions, 3 deletions
diff --git a/iurt2 b/iurt2
index 9d5b6bf..c34874e 100755
--- a/iurt2
+++ b/iurt2
@@ -199,7 +199,8 @@ $run{todo} = [];
sub {
$run{log} = pop @_;
open my $log, ">$run{log}" or die "unable to open $run{log}\n";
- $run{LOG} = sub { print $log @_ };
+ $run{LOG} = sub { print $log @_ };
+ $run{logfd} = $log;
print *$log, "command line: @ARGV\n";
1;
}, "Log file" ],
@@ -359,7 +360,7 @@ $run{todo} = [];
open(my $LOG, ">&STDERR");
$run{LOG} = sub { print $LOG @_ };
-plog_init($program_name, $LOG, 7, 1); # For parsing command line
+plog_init($program_name, $run{logfd}||$LOG, 7, 1); # For parsing command line
# Display version information
#
@@ -378,7 +379,7 @@ foreach my $t (@$todo) {
}
# Use the real verbose level
-plog_init($program_name, $LOG, $run{verbose}, 1);
+plog_init($program_name, $run{logfd}||$LOG, $run{verbose}, 1);
$run{distro_tag} = $run{distro};
$run{distro_tag} =~ s,/,-,g;