aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ Pipkin <j@dawnrazor.net>2013-01-03 01:34:14 -0600
committerJ Pipkin <j@dawnrazor.net>2013-01-03 01:34:14 -0600
commita6f6c1525b6f8e564456b9eb6961bf69eebd735e (patch)
tree58c81e317371960fbdd6e33534c1367063e04267
parent5c142df2317aab55751f1d3c659ee08dc613ddf9 (diff)
downloadsbotools2-a6f6c1525b6f8e564456b9eb6961bf69eebd735e.tar.xz
store the list of available updates in /var/log/sbocheck.log
-rwxr-xr-xsbocheck7
1 files changed, 7 insertions, 0 deletions
diff --git a/sbocheck b/sbocheck
index 424fec0..73bf7c1 100755
--- a/sbocheck
+++ b/sbocheck
@@ -64,6 +64,13 @@ sub print_output($) {
$tab->configure(tab => '\s');
my $output = $tab->format(@$listing);
say "\n". $output;
+ # save a log of available updates
+ my $logfile = '/var/log/sbocheck.log';
+ unlink $logfile if -f $logfile;
+ my $log_fh = open_fh($logfile, '>');
+ print {$log_fh} $output;
+ close $log_fh;
+ say "A copy of the above result is kept in $logfile\n";
} else {
say "\nNo updates available.";
}