summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-10-28 11:28:31 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-10-28 11:28:31 -0700
commit3c72265b610ef61de23de9ae85a536a833ae08c8 (patch)
tree21eb08a2f64b9c887eebd278572c0c4ef847def1
parentde8b643eb1ff7c056f4e5e9c920387ed2d2d2a11 (diff)
downloadvyatta-config-mgmt-3c72265b610ef61de23de9ae85a536a833ae08c8.tar.gz
vyatta-config-mgmt-3c72265b610ef61de23de9ae85a536a833ae08c8.zip
Move commit-uri under remote-archive.
-rw-r--r--lib/Vyatta/ConfigMgmt.pm2
-rwxr-xr-xscripts/vyatta-commit-push.pl2
-rwxr-xr-xscripts/vyatta-config-mgmt.pl4
-rw-r--r--templates-cfg/system/config-mgmt/remote-archive/commit-uri/node.def (renamed from templates-cfg/system/config-mgmt/commit-uri/node.def)0
-rw-r--r--templates-cfg/system/config-mgmt/remote-archive/node.def1
5 files changed, 5 insertions, 4 deletions
diff --git a/lib/Vyatta/ConfigMgmt.pm b/lib/Vyatta/ConfigMgmt.pm
index 85d9c72..7c2ab91 100644
--- a/lib/Vyatta/ConfigMgmt.pm
+++ b/lib/Vyatta/ConfigMgmt.pm
@@ -118,7 +118,7 @@ sub cm_commit_get_log {
my @lines = cm_read_file($commit_log_file);
my @commit_log = ();
- my $count = 0;
+ my $count = 1;
foreach my $line (@lines) {
if ($line !~ /^\|(.*)\|$/) {
print "Invalid log format [$line]\n";
diff --git a/scripts/vyatta-commit-push.pl b/scripts/vyatta-commit-push.pl
index ab63509..2cbd887 100755
--- a/scripts/vyatta-commit-push.pl
+++ b/scripts/vyatta-commit-push.pl
@@ -41,7 +41,7 @@ use URI;
my $debug = 0;
my $config = new Vyatta::Config;
-$config->setLevel('system config-mgmt');
+$config->setLevel('system config-mgmt remote-archive');
my @uris = $config->returnOrigValues('commit-uri');
if (scalar(@uris) < 1) {
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl
index e3f01ec..c074793 100755
--- a/scripts/vyatta-config-mgmt.pl
+++ b/scripts/vyatta-config-mgmt.pl
@@ -74,7 +74,7 @@ my ($cmd, $rc) = ('', 1);
if ($action eq 'add-uri') {
print "add-uri\n" if $debug;
my $config = new Vyatta::Config;
- $config->setLevel('system config-mgmt');
+ $config->setLevel('system config-mgmt remote-archive');
my @uris = $config->returnValues('commit-uri');
my $link = get_link($commit_uri_script);
if (scalar(@uris) >= 1 and ! -e $link) {
@@ -88,7 +88,7 @@ if ($action eq 'add-uri') {
if ($action eq 'del-uri') {
print "del-uri\n" if $debug;
my $config = new Vyatta::Config;
- $config->setLevel('system config-mgmt');
+ $config->setLevel('system config-mgmt remote-archive');
my @uris = $config->returnValues('commit-uri');
if (scalar(@uris) <= 0) {
my $link = get_link($commit_uri_script);
diff --git a/templates-cfg/system/config-mgmt/commit-uri/node.def b/templates-cfg/system/config-mgmt/remote-archive/commit-uri/node.def
index 7b483f9..7b483f9 100644
--- a/templates-cfg/system/config-mgmt/commit-uri/node.def
+++ b/templates-cfg/system/config-mgmt/remote-archive/commit-uri/node.def
diff --git a/templates-cfg/system/config-mgmt/remote-archive/node.def b/templates-cfg/system/config-mgmt/remote-archive/node.def
new file mode 100644
index 0000000..073ba7a
--- /dev/null
+++ b/templates-cfg/system/config-mgmt/remote-archive/node.def
@@ -0,0 +1 @@
+help: Remote archival settings \ No newline at end of file