my $config_file = "mirror.yaml";
my $sync = undef;
+my $DEBUG = undef;
my $lock_file = "/var/lock/mirror-" . hostname;
GetOptions("config|c=s" => $config_file,
- "sync|s" => $sync);
+ "sync|s" => $sync,
+ "debug|d" => $DEBUG,
+);
my @errors = ();
my @warnings = ();
$cmd = "$c->{$rmtssh} \"$cmd\""
if defined $c->{rmtssh};
+ if (defined $DEBUG) {
+ print "Want to run: $cmd\n";
+ return;
+ }
+
system($cmd);
if ($? >> 8 != 0) {
push @errors, "Command \"$cmd\" failed with return code " . ($? >> 8);