Commit 67981a64 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Do not backup the new exports file /usr/testbed/backup unless debug

is turned on; 60MB of exports files is not really needed these days.
parent 62e38deb
...@@ -35,7 +35,7 @@ my $SSH = "$TB/bin/sshtb -l root -host $FSNODE"; ...@@ -35,7 +35,7 @@ my $SSH = "$TB/bin/sshtb -l root -host $FSNODE";
my $PROG = "/usr/testbed/sbin/exports_setup.proxy"; my $PROG = "/usr/testbed/sbin/exports_setup.proxy";
my $exportstail = "/var/tmp/exports.tail"; my $exportstail = "/var/tmp/exports.tail";
my $lockfile = "/var/tmp/testbed_exports_lockfile"; my $lockfile = "/var/tmp/testbed_exports_lockfile";
my $dbg = 1; my $dbg = 0;
my @row; my @row;
# #
...@@ -282,8 +282,10 @@ if (!$TESTMODE) { ...@@ -282,8 +282,10 @@ if (!$TESTMODE) {
# #
# Temp Hack! Save a copy of the exports file for debugging. # Temp Hack! Save a copy of the exports file for debugging.
# #
if ($dbg) {
my $backup = "$TB/log/exports/" . TBDateTimeFSSafe(); my $backup = "$TB/log/exports/" . TBDateTimeFSSafe();
system("cp $exportstail $backup"); system("cp $exportstail $backup");
}
system("$SSH $PROG < $exportstail") == 0 or system("$SSH $PROG < $exportstail") == 0 or
fatal("Failed: $SSH $PROG < $exportstail: $?"); fatal("Failed: $SSH $PROG < $exportstail: $?");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment