diff options
author | hanzongcheng <hanzongcheng@huawei.com> | 2021-11-02 00:16:46 +0800 |
---|---|---|
committer | Jan Macku <jamacku@redhat.com> | 2021-11-02 12:08:16 +0100 |
commit | e5d95235f235c685986706224d759219a84601c7 (patch) | |
tree | 7a975efd2f1546bf4b0b2e9faff1f64ccb024725 /network-scripts/ifup-eth | |
parent | d615d9188297949a89b2ac64db4314c563955632 (diff) | |
download | initscripts-e5d95235f235c685986706224d759219a84601c7.tar initscripts-e5d95235f235c685986706224d759219a84601c7.tar.gz initscripts-e5d95235f235c685986706224d759219a84601c7.tar.bz2 initscripts-e5d95235f235c685986706224d759219a84601c7.tar.xz initscripts-e5d95235f235c685986706224d759219a84601c7.zip |
network scripts: replace "<<<" with pipe
Busybox's shell does not support "<<<", fix it by using pipe.
Signed-off-by: hanzongcheng <hanzongcheng@huawei.com>
Diffstat (limited to 'network-scripts/ifup-eth')
-rwxr-xr-x | network-scripts/ifup-eth | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index 04861e56..de6af876 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -100,11 +100,11 @@ if [ "${TYPE}" = "Bridge" ]; then forward_delay="$(convert2sec ${forward_delay} centi)" fi - forward_delay=$(bc -q <<< "${forward_delay} * 2 + 7") + forward_delay=$(echo "${forward_delay} * 2 + 7" | bc -q) # It's possible we are comparing floating point numbers here, therefore # we are using 'bc' for comparison. The [ ] and [[ ]] do not work. - (( $(bc -l <<< "${LINKDELAY:-0} < ${forward_delay}") )) && LINKDELAY=${forward_delay} + (( $(echo "${LINKDELAY:-0} < ${forward_delay}" | bc -l) )) && LINKDELAY=${forward_delay} unset forward_delay fi |