aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2017-07-21 11:25:28 +0200
committerDee'Kej <deekej@linuxmail.org>2017-10-31 12:36:19 +0100
commit3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1 (patch)
tree62bdbc24bcb1f1d85fdae30cf4cd9981b8a5f91d /sysconfig/network-scripts
parent2d35da4d458b5b9e7f6f2dd71b154286363ddf66 (diff)
downloadinitscripts-3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1.tar
initscripts-3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1.tar.gz
initscripts-3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1.tar.bz2
initscripts-3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1.tar.xz
initscripts-3e3ff2ac3d89cd626d88b3043c7f7234dec4d4e1.zip
init.d/functions: convert2sec() function added
And network-scripts/network-functions was patched to use convert2sec(). This function can be used to convert the value of its first parameter to a number of seconds - based on the time unit (specified as the second parameter). This is mostly useful for converting values for use with the sleep(1).
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r--sysconfig/network-scripts/network-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index d72901ea..145ef27c 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -198,7 +198,7 @@ ethtool_set()
IFS=';';
if [ -n "${ETHTOOL_DELAY}" ]; then
# Convert microseconds to seconds:
- local ETHTOOL_DELAY_SEC=$(awk "BEGIN {printf \"%f\", ${ETHTOOL_DELAY} / 1000000}")
+ local ETHTOOL_DELAY_SEC=$(convert2sec ${ETHTOOL_DELAY} micro)
sleep ${ETHTOOL_DELAY_SEC}
fi
for opts in $ETHTOOL_OPTS ; do