summaryrefslogtreecommitdiff
path: root/scripts/vyatta-config-mgmt.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-05 15:19:21 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-11-05 15:19:21 -0700
commita60321f3b38c93b200ff2705eebd4d274cda895d (patch)
tree86b3d04e5f6f983dce8f6f2a1059a278632bb9b1 /scripts/vyatta-config-mgmt.pl
parent9f32a72037fdc5cb3abbfa97adb4f612920847dc (diff)
downloadvyatta-config-mgmt-a60321f3b38c93b200ff2705eebd4d274cda895d.tar.gz
vyatta-config-mgmt-a60321f3b38c93b200ff2705eebd4d274cda895d.zip
Don't save a rev if the file hasn't changed.
Diffstat (limited to 'scripts/vyatta-config-mgmt.pl')
-rwxr-xr-xscripts/vyatta-config-mgmt.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl
index 46d57e9..94b9b57 100755
--- a/scripts/vyatta-config-mgmt.pl
+++ b/scripts/vyatta-config-mgmt.pl
@@ -142,11 +142,13 @@ if ($action eq 'update-revs') {
}
if (! -e $archive_dir) {
system("sudo mkdir $archive_dir");
+ system("sudo chown vyatta:vyattacfg $archive_dir");
}
my $lr_conf = "$config_file {\n";
$lr_conf .= "\t rotate $revs\n";
$lr_conf .= "\t start 0\n";
$lr_conf .= "\t compress \n";
+ $lr_conf .= "\t copy \n";
$lr_conf .= "}\n";
cm_write_file($lr_conf_file, $lr_conf);
exit 0;