summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-12-04 13:40:06 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-12-04 13:40:06 -0800
commit616465510ef187a206fc1858234b8558c3bc2f35 (patch)
treeeb145a93cb065fe304ecd6a3bf60d262769588b5
parent02583587394d7fc54d58d1200404d50dc6748c6d (diff)
downloadvyatta-config-mgmt-616465510ef187a206fc1858234b8558c3bc2f35.tar.gz
vyatta-config-mgmt-616465510ef187a206fc1858234b8558c3bc2f35.zip
Set COMMIT_VIA for initial commit-revisions setup.
-rwxr-xr-xscripts/vyatta-config-mgmt.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl
index 382b685..b57db0e 100755
--- a/scripts/vyatta-config-mgmt.pl
+++ b/scripts/vyatta-config-mgmt.pl
@@ -218,13 +218,13 @@ if ($action eq 'update-revs') {
$lr_conf .= "}\n";
cm_write_file($lr_conf_file, $lr_conf);
my $num_revs = cm_get_num_revs();
- if ($num_revs == 0) {
+ if (! -e "$archive_dir/commits" or $num_revs == 0) {
# store a baseline config
system("sudo touch $archive_dir/commits");
system("sudo chgrp vyattacfg $archive_dir/commits");
system("sudo chmod 664 $archive_dir/commits");
my $cmd = "$commit_revs_script baseline config.boot";
- system("sudo sg vyattacfg \"$cmd\"");
+ system("sudo sg vyattacfg \"export COMMIT_VIA=init; $cmd\"");
}
exit 0;
}