Skip to content
Snippets Groups Projects
Commit fd7f9d19 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci Committed by Josiney de Souza
Browse files

bandwidth.sh: Added a test to check if the user is in sudoers(1)


If the agent was updated from old versions (which didn't have root
permissions), it will avoid running the bandwidth.sh script while keeping to
collect other data and send a simplified XML (equal to the UCA's and
Projectors' XML).

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Signed-off-by: default avatarJosiney de Souza <josineys@c3sl.ufpr.br>
parent 8450e8c9
No related branches found
No related tags found
No related merge requests found
...@@ -61,8 +61,9 @@ PREFIX="$(dirname $(readlink -f $0))" ...@@ -61,8 +61,9 @@ PREFIX="$(dirname $(readlink -f $0))"
PROJECT=$PREFIX/../scripts/collect/project/source.int PROJECT=$PREFIX/../scripts/collect/project/source.int
# Verify if this is not an UCA Classmate, UCA Server nor Projector ProInfo. If # Verify if this is not an UCA Classmate, UCA Server nor Projector ProInfo. If
# it is, do not collect network data and exit # it is, do not collect network data and exit. Also exit if the user is not in
if test "$(bash $PROJECT)" != "0"; then # the sudoers(1)
if test "$(bash $PROJECT)" != "0" || ! sudo -v &> /dev/null; then
exit 0 exit 0
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment