File sysconfig-avoid-pcmcia-prod_id-err-msg.bnc551640.diff of Package sysconfig

From d21cfcf404401b04d5907ca65c68d58bfe35676a Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.de>
Date: Mon, 23 Nov 2009 12:37:44 +0100
Subject: [PATCH] Avoid error message, when pcmcia device does not provide its
 vendor/name info via sysfs device/prod_id files (bnc#551640).

---
 scripts/ifup |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/ifup b/scripts/ifup
index 1b4e4e4..b0ac38a 100755
--- a/scripts/ifup
+++ b/scripts/ifup
@@ -479,9 +479,8 @@ DEVNAME=
 if [ -n "$VENDORID$PRODUCTID" -a "$BUSNAME" = pci -a -x /sbin/lspci ] ; then
 	DEVNAME=`lspci -d $VENDORID:$PRODUCTID 2>/dev/null | sed -n 1p`
 	DEVNAME=${DEVNAME#*: }
-fi
-if [ "$BUSNAME" = pcmcia ] ; then
-	DEVNAME=`cat /sys/class/net/$INTERFACE/device/prod_id*`
+elif [ "$BUSNAME" = pcmcia ] ; then
+	DEVNAME=`cat /sys/class/net/$INTERFACE/device/prod_id* 2>/dev/null`
 fi
 if [ -n "$DEVNAME" ] ; then
 	message "`printf "    %-9s device: %s" $INTERFACE "$DEVNAME"`"
-- 
1.6.4.2
openSUSE Build Service is sponsored by