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/clone/system/config/node.tag/from/node.tag/node.def | 8 +++++++- templates/clone/system/config/node.tag/node.def | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'templates/clone/system/config') diff --git a/templates/clone/system/config/node.tag/from/node.tag/node.def b/templates/clone/system/config/node.tag/from/node.tag/node.def index d099dc8..42ef94e 100644 --- a/templates/clone/system/config/node.tag/from/node.tag/node.def +++ b/templates/clone/system/config/node.tag/from/node.tag/node.def @@ -7,4 +7,10 @@ allowed: reply=( $(compgen -f /live/image/boot/ | grep -v grub) ) done reply+=( "running://" ) echo "${reply[*]}" -run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --update $4 $6 +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + sudo ${vyatta_sbindir}/vyatta-image-tools.pl --update $4 $6 + else + echo Must be an admin user to run this command. + fi + diff --git a/templates/clone/system/config/node.tag/node.def b/templates/clone/system/config/node.tag/node.def index 415b665..d54a4cf 100644 --- a/templates/clone/system/config/node.tag/node.def +++ b/templates/clone/system/config/node.tag/node.def @@ -7,4 +7,10 @@ allowed: reply=( $(compgen -f /live/image/boot/ | grep -v grub) ) done reply+=( "running://" ) echo "${reply[*]}" -run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --updateone $4 +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + sudo ${vyatta_sbindir}/vyatta-image-tools.pl --updateone $4 + else + echo Must be an admin user to run this command. + fi + -- cgit v1.2.3