diff options
Diffstat (limited to 'templates/clone/system')
-rw-r--r-- | templates/clone/system/config/node.tag/from/node.tag/node.def | 8 | ||||
-rw-r--r-- | templates/clone/system/config/node.tag/node.def | 8 |
2 files changed, 14 insertions, 2 deletions
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 + |