diff options
Diffstat (limited to 'templates/show')
10 files changed, 64 insertions, 16 deletions
diff --git a/templates/show/tech-support/brief/node.def b/templates/show/tech-support/brief/node.def index 800574c..23f588e 100644 --- a/templates/show/tech-support/brief/node.def +++ b/templates/show/tech-support/brief/node.def @@ -1,2 +1,7 @@ help: Show brief tech-support report -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/brief/save-uncompressed/node.def b/templates/show/tech-support/brief/save-uncompressed/node.def index cc271de..7d36614 100644 --- a/templates/show/tech-support/brief/save-uncompressed/node.def +++ b/templates/show/tech-support/brief/save-uncompressed/node.def @@ -1,2 +1,7 @@ help: Save uncompressed brief tech-support report -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save-uncompressed +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save-uncompressed + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/brief/save-uncompressed/node.tag/node.def b/templates/show/tech-support/brief/save-uncompressed/node.tag/node.def index 523a340..f90ecd4 100644 --- a/templates/show/tech-support/brief/save-uncompressed/node.tag/node.def +++ b/templates/show/tech-support/brief/save-uncompressed/node.tag/node.def @@ -1,4 +1,8 @@ help: Save uncompressed brief tech-support report to specified file/path -allowed: echo -n 'file scp://<user>:<passwd>@<host>/<file> ftp://<user>:<passwd>@<host>/<file>' -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save-uncompressed $5 - +allowed: echo -n '<file> <scp://<user>:<passwd>@<host>/<file>> <ftp://<user>:<passwd>@<host>/<file>>' +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save-uncompressed $5 + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/brief/save/node.def b/templates/show/tech-support/brief/save/node.def index c738a0a..966a984 100644 --- a/templates/show/tech-support/brief/save/node.def +++ b/templates/show/tech-support/brief/save/node.def @@ -1,2 +1,7 @@ help: Save brief tech-support report -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/brief/save/node.tag/node.def b/templates/show/tech-support/brief/save/node.tag/node.def index 95aaa87..97ebdf6 100644 --- a/templates/show/tech-support/brief/save/node.tag/node.def +++ b/templates/show/tech-support/brief/save/node.tag/node.def @@ -1,4 +1,8 @@ help: Save compressed brief tech-support report to specified file/path -allowed: echo -n 'file scp://<user>:<passwd>@<host>/<file> ftp://<user>:<passwd>@<host>/<file>' -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save $5 - +allowed: echo -n '<file> <scp://<user>:<passwd>@<host>/<file>> <ftp://<user>:<passwd>@<host>/<file>>' +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support-brief save $5 + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/node.def b/templates/show/tech-support/node.def index e47842b..34d8e22 100644 --- a/templates/show/tech-support/node.def +++ b/templates/show/tech-support/node.def @@ -1,2 +1,7 @@ help: Show consolidated tech-support report -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/save-uncompressed/node.def b/templates/show/tech-support/save-uncompressed/node.def index 71c774a..4036eaf 100644 --- a/templates/show/tech-support/save-uncompressed/node.def +++ b/templates/show/tech-support/save-uncompressed/node.def @@ -1,2 +1,7 @@ help: Save consolidated tech-support report uncompressed -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support save-uncompressed +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support save-uncompressed + else + echo Must be an admin user to run this command. + fi diff --git a/templates/show/tech-support/save-uncompressed/node.tag/node.def b/templates/show/tech-support/save-uncompressed/node.tag/node.def index adf21ee..41efd2f 100644 --- a/templates/show/tech-support/save-uncompressed/node.tag/node.def +++ b/templates/show/tech-support/save-uncompressed/node.tag/node.def @@ -1,3 +1,8 @@ help: Save uncompressed tech-support report to specified file/path -allowed: echo -n 'file scp://<user>:<passwd>@<host>/<file> ftp://<user>:<passwd>@<host>/<file>' -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support save-uncompressed $4 +allowed: echo -n '<file> <scp://<user>:<passwd>@<host>/<file>> <ftp://<user>:<passwd>@<host>/<file>>' +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support save-uncompressed $4 + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/save/node.def b/templates/show/tech-support/save/node.def index 874339b..54635d6 100644 --- a/templates/show/tech-support/save/node.def +++ b/templates/show/tech-support/save/node.def @@ -1,2 +1,7 @@ help: Save consolidated tech-support report -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support save +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support save + else + echo Must be an admin user to run this command + fi diff --git a/templates/show/tech-support/save/node.tag/node.def b/templates/show/tech-support/save/node.tag/node.def index 5722c19..ac8f56f 100644 --- a/templates/show/tech-support/save/node.tag/node.def +++ b/templates/show/tech-support/save/node.tag/node.def @@ -1,3 +1,8 @@ help: Save compressed tech-support report to the specified file/path -allowed: echo -n 'file scp://<user>:<passwd>@<host>/<file> ftp://<user>:<passwd>@<host>/<file>' -run: source ${vyatta_datadir}/vyatta-op/functions/tech-support save $4 +allowed: echo -n '<file> <scp://<user>:<passwd>@<host>/<file>> <ftp://<user>:<passwd>@<host>/<file>>' +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + source ${vyatta_datadir}/vyatta-op/functions/tech-support save $4 + else + echo Must be an admin user to run this command + fi |