From: Rick Farina <sidhayn@gmail.com>
To: mcgrof@gmail.com
Cc: linux-wireless@vger.kernel.org, Rick Farina <sidhayn@gmail.com>
Subject: [PATCH 1/2] replace modprobe -l with modinfo
Date: Thu, 2 Feb 2012 21:48:21 -0500 [thread overview]
Message-ID: <1328237302-13423-1-git-send-email-sidhayn@gmail.com> (raw)
modprobe -l is either deprecated or removed, so let's replace it.
Signed-of-by: Rick Farina <sidhayn@gmail.com>
---
Makefile | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index e3d9128..1f8ab91 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,6 @@ else
export KLIB:= /lib/modules/$(shell uname -r)
endif
export KLIB_BUILD ?= $(KLIB)/build
-# Sometimes not available in the path
-MODPROBE := /sbin/modprobe
-
-ifneq ($(wildcard $(MODPROBE)),)
-MADWIFI=$(shell $(MODPROBE) -l ath_pci)
-OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
-endif
DESTDIR?=
@@ -188,7 +181,7 @@ install-scripts: $(MODPROBE)
@install scripts/athload $(DESTDIR)/usr/sbin/
@install scripts/b43load $(DESTDIR)/usr/sbin/
@install scripts/iwl-load $(DESTDIR)/usr/sbin/
- @if [ ! -z "$(MADWIFI)" ] && [ -z "$(DESTDIR)" ]; then \
+ @if `modinfo ath_pci > /dev/null 2>&1` && [ -z "$(DESTDIR)" ]; then \
echo ;\
echo -n "Note: madwifi detected, we're going to disable it. " ;\
echo "If you would like to enable it later you can run:" ;\
@@ -197,7 +190,7 @@ install-scripts: $(MODPROBE)
echo Running athenable ath5k...;\
/usr/sbin/athenable ath5k ;\
fi
- @if [ ! -z "$(OLD_IWL)" ] && [ -z "$(DESTDIR)" ]; then \
+ @if `modinfo iwl4965 > /dev/null 2>&1` && [ -z "$(DESTDIR)" ]; then \
echo ;\
echo -n "Note: iwl4965 detected, we're going to disable it. " ;\
echo "If you would like to enable it later you can run:" ;\
--
1.7.3.4
next reply other threads:[~2012-02-03 2:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 2:48 Rick Farina [this message]
2012-02-03 2:48 ` [PATCH 2/2] cleanup modprobe calls Rick Farina
2012-02-03 5:57 ` Luciano Coelho
2012-02-03 14:13 ` Richard Farina
2012-02-03 14:18 ` Luciano Coelho
2012-02-03 14:31 ` Richard Farina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328237302-13423-1-git-send-email-sidhayn@gmail.com \
--to=sidhayn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).