From bfdab365e661577e96ced3c226a63244aa50609f Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 6 May 2011 13:33:58 -0500 Subject: Bugfix 7059 These commands weren't specified in the bug but they needed the same check --- templates/copy/file/node.tag/to/node.tag/node.def | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'templates/copy') diff --git a/templates/copy/file/node.tag/to/node.tag/node.def b/templates/copy/file/node.tag/to/node.tag/node.def index 75d4aff..0f03a23 100644 --- a/templates/copy/file/node.tag/to/node.tag/node.def +++ b/templates/copy/file/node.tag/to/node.tag/node.def @@ -4,4 +4,10 @@ help: Copy files to specified destination tftp:/// comptype: imagefiles allowed: echo -n "" -run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --copy $3 $5 +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + sudo ${vyatta_sbindir}/vyatta-image-tools.pl --copy $3 $5 + else + echo Must be an admin user to run this command. + fi + -- cgit v1.2.3