summaryrefslogtreecommitdiff
path: root/templates-op
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-02 17:39:29 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-11-02 17:39:29 -0700
commit8d874b22fd50dc3cfcd971c3d85804ffccb18789 (patch)
tree18caae2b79952cf56845578f8f9fc37a68447387 /templates-op
parent0d5c217313f8ac47944bd50d800c2bd44b4a833b (diff)
downloadvyatta-config-mgmt-8d874b22fd50dc3cfcd971c3d85804ffccb18789.tar.gz
vyatta-config-mgmt-8d874b22fd50dc3cfcd971c3d85804ffccb18789.zip
Add revision compare functionality
Diffstat (limited to 'templates-op')
-rw-r--r--templates-op/show/system/commit/file/node.tag/compare/node.def1
-rw-r--r--templates-op/show/system/commit/file/node.tag/compare/node.tag/node.def8
-rw-r--r--templates-op/show/system/commit/file/node.tag/node.def11
-rw-r--r--templates-op/show/system/commit/node.def1
4 files changed, 17 insertions, 4 deletions
diff --git a/templates-op/show/system/commit/file/node.tag/compare/node.def b/templates-op/show/system/commit/file/node.tag/compare/node.def
new file mode 100644
index 0000000..84cb0a9
--- /dev/null
+++ b/templates-op/show/system/commit/file/node.tag/compare/node.def
@@ -0,0 +1 @@
+help: compare config file revisions
diff --git a/templates-op/show/system/commit/file/node.tag/compare/node.tag/node.def b/templates-op/show/system/commit/file/node.tag/compare/node.tag/node.def
new file mode 100644
index 0000000..95a4bed
--- /dev/null
+++ b/templates-op/show/system/commit/file/node.tag/compare/node.tag/node.def
@@ -0,0 +1,8 @@
+help: compare config file revisions
+run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
+ then
+ ${vyatta_sbindir}/vyatta-config-mgmt.pl \
+ --action=diff "$5" "$7"
+ else
+ echo Must be an admin user to run this command.
+ fi
diff --git a/templates-op/show/system/commit/file/node.tag/node.def b/templates-op/show/system/commit/file/node.tag/node.def
index 52fd065..ac62ad5 100644
--- a/templates-op/show/system/commit/file/node.tag/node.def
+++ b/templates-op/show/system/commit/file/node.tag/node.def
@@ -1,4 +1,9 @@
help: show commit revision file
-run: ${vyatta_sbindir}/vyatta-config-mgmt.pl \
- --action=show-commit-file \
- --revnum="$5"
+run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
+ then
+ ${vyatta_sbindir}/vyatta-config-mgmt.pl \
+ --action=show-commit-file \
+ --revnum="$5"
+ else
+ echo Must be an admin user to run this command.
+ fi
diff --git a/templates-op/show/system/commit/node.def b/templates-op/show/system/commit/node.def
index 4646d29..4fea8fc 100644
--- a/templates-op/show/system/commit/node.def
+++ b/templates-op/show/system/commit/node.def
@@ -1,3 +1,2 @@
help: Show commit revisions log
run: ${vyatta_sbindir}/vyatta-config-mgmt.pl --action=show-commit-log
-