aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth2
-rw-r--r--sysconfig/network-scripts/network-functions8
2 files changed, 7 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 7ccbddf1..040d52d8 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -159,7 +159,7 @@ fi
# wait up to 5 seconds for device to actually come down...
waited=0
while ! check_device_down ${DEVICE} && [ "$waited" -lt 50 ] ; do
- usleep 10000
+ sleep 0.01
waited=$(($waited+1))
done
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 1867c38a..330f6738 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -196,7 +196,11 @@ ethtool_set()
{
oldifs=$IFS;
IFS=';';
- [ -n "${ETHTOOL_DELAY}" ] && /bin/usleep ${ETHTOOL_DELAY}
+ if [ -n "${ETHTOOL_DELAY}" ]; then
+ # Convert microseconds to seconds:
+ local ETHTOOL_DELAY_SEC=$(awk "BEGIN {printf \"%f\", ${ETHTOOL_DELAY} / 1000000}")
+ sleep ${ETHTOOL_DELAY_SEC}
+ fi
for opts in $ETHTOOL_OPTS ; do
IFS=$oldifs;
if [[ "${opts}" =~ [[:space:]]*- ]]; then
@@ -464,7 +468,7 @@ check_link_down ()
[ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2))
while [ $timeout -le $delay ]; do
[ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" != "0" ] && return 1
- usleep 500000
+ sleep 0.5
timeout=$((timeout+1))
done
return 0