diff options
author | hanzongcheng <hanzongcheng@huawei.com> | 2021-11-02 00:17:46 +0800 |
---|---|---|
committer | Jan Macku <jamacku@redhat.com> | 2021-11-02 12:08:16 +0100 |
commit | acc1df2d3918edaee76d95c88bc93ae50fa58de4 (patch) | |
tree | 616e8b67df07f140ac5c3138a058ab7d16c790b9 /network-scripts | |
parent | e5d95235f235c685986706224d759219a84601c7 (diff) | |
download | initscripts-acc1df2d3918edaee76d95c88bc93ae50fa58de4.tar initscripts-acc1df2d3918edaee76d95c88bc93ae50fa58de4.tar.gz initscripts-acc1df2d3918edaee76d95c88bc93ae50fa58de4.tar.bz2 initscripts-acc1df2d3918edaee76d95c88bc93ae50fa58de4.tar.xz initscripts-acc1df2d3918edaee76d95c88bc93ae50fa58de4.zip |
network scripts: do not use c-style for-loop
Busybox's shell does not support c-style for-loop, use seq method to fix it.
Signed-off-by: hanzongcheng <hanzongcheng@huawei.com>
Diffstat (limited to 'network-scripts')
-rw-r--r-- | network-scripts/network-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/network-scripts/network-functions b/network-scripts/network-functions index c7d9e60e..89c0bcaf 100644 --- a/network-scripts/network-functions +++ b/network-scripts/network-functions @@ -572,7 +572,7 @@ install_bonding_driver () # add the bits to setup driver parameters here # first set mode, miimon - for (( idx=0; idx < ${#bopts_keys[*]}; idx++ )) ; do + for idx in $(seq 0 $(( ${#bopts_keys[*]} - 1 ))) ; do key=${bopts_keys[$idx]} value=${bopts_vals[$idx]} @@ -591,7 +591,7 @@ install_bonding_driver () done # set all other remaining options - for (( idx=0; idx < ${#bopts_keys[*]}; idx++ )) ; do + for idx in $(seq 0 $(( ${#bopts_keys[*]} - 1 ))) ; do key=${bopts_keys[$idx]} value=${bopts_vals[$idx]} |