Fix link check.

This commit is contained in:
Bill Nottingham 2010-02-15 17:34:12 +00:00
parent e5f4aa94b8
commit d76b34a7d4
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 02a024a..89baeb4 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -253,7 +253,7 @@ check_link_down ()
delay=10
[ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2))
while [ $timeout -le $delay ]; do
- [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" = "1" ] && return 1
+ [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" != "0" ] && return 1
usleep 500000
timeout=$((timeout+1))
done

View File

@ -6,9 +6,10 @@ Version: 9.05
# ppp-watch is GPLv2+, everything else is GPLv2
License: GPLv2 and GPLv2+
Group: System Environment/Base
Release: 1%{?dist}
Release: 1%{?dist}.1
URL: http://fedorahosted.org/releases/i/n/initscripts/
Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2
Patch: initscripts-9.05-link.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15
Requires: /sbin/sysctl, syslog
@ -63,6 +64,7 @@ Currently, this consists of various memory checking code.
%prep
%setup -q
%patch -p1
%build
make