From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH] Modify tools/setup.sh to be compatible with fedora 21 Date: Wed, 8 Oct 2014 10:36:52 -0400 Message-ID: <20141008143652.GC5279@localhost.localdomain> References: <1412773891-25774-1-git-send-email-danielx.t.mrzyglod@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org, Daniel Mrzyglod To: Daniel Mrzyglod Return-path: Content-Disposition: inline In-Reply-To: <1412773891-25774-1-git-send-email-danielx.t.mrzyglod-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Wed, Oct 08, 2014 at 02:11:31PM +0100, Daniel Mrzyglod wrote: > From: Daniel Mrzyglod > > script was expecting /lib/modules/$(uname -r)/kernel/drivers/uio/uio.ko but in fedora 21 > there are Compressed kernel modules - xz (LZMA) > > Signed-off-by: Daniel Mrzyglod > --- > tools/setup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/setup.sh b/tools/setup.sh > index 369e09e..6a9d23c 100755 > --- a/tools/setup.sh > +++ b/tools/setup.sh > @@ -169,7 +169,7 @@ load_igb_uio_module() > > /sbin/lsmod | grep -s uio > /dev/null > if [ $? -ne 0 ] ; then > - if [ -f /lib/modules/$(uname -r)/kernel/drivers/uio/uio.ko ] ; then > + if ls /lib/modules/$(uname -r)/kernel/drivers/uio/uio.ko* &> /dev/null; then > echo "Loading uio module" > sudo /sbin/modprobe uio > fi > -- > 2.1.0 > > Just use modinfo uio and test the exit code. That will make the setup script agnostic to both filename extension and to kernel version, as modinfo looks in the running kernel path automatically Neil