From d76b34a7d4c203733ac651a3cb26e5c788c422dd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Feb 15 2010 17:34:12 +0000 Subject: Fix link check. --- diff --git a/initscripts-9.05-link.patch b/initscripts-9.05-link.patch new file mode 100644 index 0000000..e9855d4 --- /dev/null +++ b/initscripts-9.05-link.patch @@ -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 diff --git a/initscripts.spec b/initscripts.spec index ee4b6fa..57de21d 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -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