summaryrefslogtreecommitdiff
path: root/templates/delete
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-05-06 13:33:58 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-05-06 13:33:58 -0500
commitbfdab365e661577e96ced3c226a63244aa50609f (patch)
tree9929f03d3b2c4c51a1036f853ced803ad1666ba4 /templates/delete
parent626296ae1aa7eff8ec9d47761f372a652e9ee9df (diff)
downloadvyatta-op-bfdab365e661577e96ced3c226a63244aa50609f.tar.gz
vyatta-op-bfdab365e661577e96ced3c226a63244aa50609f.zip
Bugfix 7059 These commands weren't specified in the bug but they needed the same check
Diffstat (limited to 'templates/delete')
-rw-r--r--templates/delete/file/node.tag/node.def8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/delete/file/node.tag/node.def b/templates/delete/file/node.tag/node.def
index 715ba48..0faf383 100644
--- a/templates/delete/file/node.tag/node.def
+++ b/templates/delete/file/node.tag/node.def
@@ -1,4 +1,10 @@
help: Delete files in the specified directory
comptype: imagefiles
allowed: echo -n "<imagefiles>"
-run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --delete=$3
+run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
+ then
+ sudo ${vyatta_sbindir}/vyatta-image-tools.pl --delete=$3
+ else
+ echo Must be an admin user to run this command.
+ fi
+