Bug#758798: Another patch

2014-12-01 Thread Graeme Hewson
See also https://bugs.launchpad.net/ubuntu/+source/ifupdown-extra/+bug/1397965 
which provides, IMHO, a better description of the problem and a simpler patch.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758798: Another patch

2014-10-07 Thread law_ence . dev
Hi,

ael wrote (27 Aug 2014 20:19:07 GMT) :
 On Wed, Aug 27, 2014 at 11:49:31AM -0700, intrigeri wrote:
 What's wrong with the initial one-liner patch? It works fine for me.

 It was completely wrong :-( It breaks the line up into several
 strings instead of one large quoted string. (From memory, I don't
 have the code in front of me.) It happens to suppress the error message,
 but that doesn't mean that it was correct...

I suspect you meant to Cc the bug report when sending this reply.

Probably. I don't seem to be able to find my original, so I am sending
this to the bug.

 This new patch doesn't apply for me as-is.

 Further apologies. It should apply cleanly if you apply my wrong patch
 first.  I would have diff'ed against the original, but I had already
 deleted that and it was only 2 characters astray.

ael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758798: Another patch

2014-08-27 Thread intrigeri
Hi,

I can reproduce this bug.

ael wrote (21 Aug 2014 19:50:16 GMT) :
 I was a bit too quick with that last patch: too many 's overlloked :-(

What's wrong with the initial one-liner patch? It works fine for me.

 The problem is a bit more tricky to fix.
 New patch attached.

This new patch doesn't apply for me as-is.

Cheers,
--
intrigeri


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758798: Another patch

2014-08-21 Thread ael
I was a bit too quick with that last patch: too many 's overlloked :-(

The problem is a bit more tricky to fix.
New patch attached.

ael


--- 00check-network-cable_broken	2014-08-21 14:48:47.998575266 +0100
+++ 00check-network-cable	2014-08-21 20:10:45.217430736 +0100
@@ -67,17 +67,27 @@
 	return $status
 }
 
-check_status_ethtool() {
-	local status=0
-	local LINK=$($ETHTOOL $IFACE 21 | grep Link detected || :)
-
-	# If ethtool fails to print out the link line we break off
+check_link () {
+	# If ethtool fails to print out the link line we assume OK
 	# notice that ethtool cannot get the link status out of all
 	# possible network interfaces
-	[ $LINK ] || return 1
-	if ! echo $LINK | grep -q Link detected: yes; then
-		status=1
+
+	if echo $* |grep -q Link detected ;
+		then 
+ echo $* | grep -q Link detected: yes ;
+  return
+		else
+		 return 1 ;
 	fi
+}
+
+check_status_ethtool() {
+	local status
+	local Old_IFS=$IFS
+	IFS=
+	check_link $($ETHTOOL $IFACE | grep Link detected )
+	status=$?
+	IFS=$Old_IFS
 	return $status
 }