summaryrefslogtreecommitdiff
path: root/templates/clone/system/config
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/clone/system/config
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/clone/system/config')
-rw-r--r--templates/clone/system/config/node.tag/from/node.tag/node.def8
-rw-r--r--templates/clone/system/config/node.tag/node.def8
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
+