From 59ddddaac272ad7fa9d53dad4f744e49a253c856 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Tue, 11 Aug 2009 08:04:59 -0400 Subject: grep tweaks Signed-off-by: Jim Pryor --- src/connections/ethernet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/connections/ethernet') diff --git a/src/connections/ethernet b/src/connections/ethernet index 61e3960..08093a5 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -5,7 +5,7 @@ ethernet_up() { load_profile $1 if [[ ! -e /sys/class/net/"$INTERFACE" ]]; then - if ! echo "$INTERFACE"|grep ":"; then + if ! echo "$INTERFACE"| fgrep ":"; then report_fail "interface $INTERFACE does not exist" return 1 fi @@ -14,7 +14,7 @@ ethernet_up() { report_debug ethernet_up ifup set_interface up $INTERFACE - if ip link show $INTERFACE|grep -q "NO-CARRIER"; then + if ip link show $INTERFACE| fgrep -q "NO-CARRIER"; then report_fail "No connection" return 1 fi @@ -140,7 +140,7 @@ ethernet_down() { # Returns status of profile - is it still functional? ethernet_status() { - if ! ip link show dev ra0|grep -q "state UP"; then + if ! ip link show dev ra0 | fgrep -q "state UP"; then return 1 fi } -- cgit v1.2.3-24-g4f1b