summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-19 18:07:47 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-11-19 18:07:47 -0800
commit6f0cb827a62b342cc2b2dc8c5df8def156a11334 (patch)
tree3d736517a22757501457b4e7a4cf284fc7418f08
parentb08fad72dc5091b6ec40fc1de918157b75a1550a (diff)
downloadvyatta-config-mgmt-6f0cb827a62b342cc2b2dc8c5df8def156a11334.tar.gz
vyatta-config-mgmt-6f0cb827a62b342cc2b2dc8c5df8def156a11334.zip
Add "show system commit diff N" op mode command.
-rw-r--r--templates-op/show/system/commit/diff/node.def1
-rw-r--r--templates-op/show/system/commit/diff/node.tag/node.def15
2 files changed, 16 insertions, 0 deletions
diff --git a/templates-op/show/system/commit/diff/node.def b/templates-op/show/system/commit/diff/node.def
new file mode 100644
index 0000000..b2be2fc
--- /dev/null
+++ b/templates-op/show/system/commit/diff/node.def
@@ -0,0 +1 @@
+help: show commit revision diff \ No newline at end of file
diff --git a/templates-op/show/system/commit/diff/node.tag/node.def b/templates-op/show/system/commit/diff/node.tag/node.def
new file mode 100644
index 0000000..b580a82
--- /dev/null
+++ b/templates-op/show/system/commit/diff/node.tag/node.def
@@ -0,0 +1,15 @@
+help: config file changes at a given revision
+run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
+ then
+ if [[ $5 = *[[:digit:]]* ]];
+ then
+ next=$(($5+1))
+ else
+ echo Invalid number $5
+ exit 1;
+ fi
+ ${vyatta_sbindir}/vyatta-config-mgmt.pl \
+ --action=diff "$5" "$next"
+ else
+ echo Must be an admin user to run this command.
+ fi