From 27724e4df026baa6def7d44ed08f4b8a7c1fdec7 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Mon, 30 Jul 2018 14:15:24 +0200 Subject: ifup-eth: use 'bc' instead of 'expr' when computing $forward_delay Because the return value of 'convert2sec()' function can sometimes be decimal, the follow up 'expr' call can fail, since 'expr' does not support floating point calculations. This can sometimes lead to error: """ expr: non-integer argument /etc/sysconfig/network-scripts/ifup-eth: line 91: [: 0: unary operator expected """ To solve this bug, we switch to 'bc' utility, which supports floating point computations. We also have to change the comparison condition of $LINKDELAY and $forward_delay to use 'bc' as well. --- initscripts.spec | 1 + 1 file changed, 1 insertion(+) (limited to 'initscripts.spec') diff --git a/initscripts.spec b/initscripts.spec index 248807cb..1679d342 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -94,6 +94,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %shared_requirements +Requires: bc Requires: dbus Requires: gawk Requires: grep -- cgit v1.2.1