summaryrefslogtreecommitdiff
path: root/templates/show/configuration/files/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/show/configuration/files/node.def')
-rw-r--r--templates/show/configuration/files/node.def7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/show/configuration/files/node.def b/templates/show/configuration/files/node.def
index b13bc6d..698ba14 100644
--- a/templates/show/configuration/files/node.def
+++ b/templates/show/configuration/files/node.def
@@ -1,5 +1,10 @@
help: Show available saved configurations
-run: find ${vyatta_sysconfdir}/config/ -type f -not -name ".*" -not -name "config.boot.*" -printf "%f\t(%Tc)\t%T@\n" | sort -r -k3 | awk -F"\t" '{printf ("%-20s\t%s\n", $1,$2) ;}'
+run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
+ then
+ find ${vyatta_sysconfdir}/config/ -type f -not -name ".*" -not -name "config.boot.*" -printf "%f\t(%Tc)\t%T@\n" | sort -r -k3 | awk -F"\t" '{printf ("%-20s\t%s\n", $1,$2) ;}'
+ else
+ echo Must be an admin user to run this command.
+ fi