Skip to content

Commit

Permalink
add test for netperf and provide install hint on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Leif Sawyer committed Mar 20, 2017
1 parent df570de commit 8801fe2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions BettererSpeedTest
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ usage() {
exit 1
}

prereqs() {
echo "Can't find the netperf binary in your current path"
echo "use your package manager to install netperf"
echo ""
exit 1
}

# Summarize the contents of the ping's output file to show min, avg, median, max, etc.
# input parameter ($1) file contains the output of the ping command

Expand Down Expand Up @@ -213,6 +220,8 @@ measure_direction() {
[[ -r /etc/default/bettererc ]] && . /etc/default/bettererc
[[ -r ${HOME}/.bettererc ]] && . ${HOME}/.bettererc

[[ -z $(which netperf) ]] && prereqs

# extract options and their arguments into variables.
while [ $# -gt 0 ]
do
Expand Down

0 comments on commit 8801fe2

Please sign in to comment.