Skip to content

Commit

Permalink
Allow float values for priming
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlight200 committed May 4, 2021
1 parent a5a7bd6 commit 3ce6cfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion opensand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -o nounset
set -o errtrace
set -o functrace

export SCRIPT_VERSION="1.5.2"
export SCRIPT_VERSION="1.5.3"
export SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

set -o allexport
Expand Down
6 changes: 3 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function _osnd_prime_env() {
local seconds=$1

log D "Priming environment"
sudo timeout --foreground $((seconds + 1)) ip netns exec osnd-cl \
ping -n -W 8 -c $((seconds * 100)) -l 100 -i 0.01 ${SV_LAN_SERVER_IP%%/*} >/dev/null
sudo timeout --foreground $(echo "$seconds + 1" | bc -l) ip netns exec osnd-cl \
ping -n -W 8 -c $(echo "$seconds * 100" | bc -l) -l 100 -i 0.01 ${SV_LAN_SERVER_IP%%/*} >/dev/null
}

# osnd_setup(scenario_config_ref)
Expand Down Expand Up @@ -79,7 +79,7 @@ function osnd_setup() {
sleep 1
osnd_setup_opensand "$delay_sat" "$attenuation" "$modulation_id"
sleep 1
if [[ "$prime" -gt 0 ]]; then
if (( $(echo "$prime > 0" | bc -l) )); then
_osnd_prime_env $prime
fi

Expand Down

0 comments on commit 3ce6cfd

Please sign in to comment.