Merge branch 'cherry-pick-5bd40149' into 'stable-1.5'

Avoid double quotes in arithmetic expansion.

See merge request etherlab.org/ethercat!34
This commit is contained in:
Florian Pose
2021-09-02 15:16:23 +00:00
2 changed files with 7 additions and 7 deletions

View File

@@ -99,7 +99,7 @@ start)
parse_mac_address "${BACKUP}"
BACKUPS=${BACKUPS}${MAC}
MASTER_INDEX=$(( "${MASTER_INDEX}" + 1))
MASTER_INDEX=$((${MASTER_INDEX} + 1))
done
# load master module
@@ -186,12 +186,12 @@ status)
while true; do
DEVICE=$(eval echo "\${MASTER${MASTER_COUNT}_DEVICE}")
if [ -z "${DEVICE}" ]; then break; fi
MASTER_COUNT=$(( "${MASTER_COUNT}" + 1))
MASTER_COUNT=$((${MASTER_COUNT} + 1))
done
RESULT=0
for i in $(seq 0 "$(( "${MASTER_COUNT}" - 1))"); do
for i in $(seq 0 "$((${MASTER_COUNT} - 1))"); do
echo -n "Master${i} "
# Check if the master is in idle or operation phase

View File

@@ -6,7 +6,7 @@
#
# $Id$
#
# Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
# Copyright (C) 2006-2021 Florian Pose, Ingenieurgemeinschaft IgH
#
# This file is part of the IgH EtherCAT Master.
#
@@ -162,7 +162,7 @@ start)
parse_mac_address "${BACKUP}"
BACKUPS=${BACKUPS}${MAC}
MASTER_INDEX=$(( "${MASTER_INDEX}" + 1))
MASTER_INDEX=$((${MASTER_INDEX} + 1))
done
# load master module
@@ -237,12 +237,12 @@ status)
while true; do
DEVICE=$(eval echo "\${MASTER${MASTER_COUNT}_DEVICE}")
if [ -z "${DEVICE}" ]; then break; fi
MASTER_COUNT=$(( "${MASTER_COUNT}" + 1))
MASTER_COUNT=$((${MASTER_COUNT} + 1))
done
RESULT=0
for i in $(seq 0 "$(( "${MASTER_COUNT}" - 1))"); do
for i in $(seq 0 "$((${MASTER_COUNT} - 1))"); do
echo -n "Master${i} "
# Check if the master is in idle or operation phase