compat-wireless: fix make install
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 29 Feb 2012 00:48:00 +0000 (16:48 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 29 Feb 2012 00:48:00 +0000 (16:48 -0800)
This issue was introduced via this patch:

commit 802ea47e6316aea285f2c30d95763dd7c320eec1
Author: Rick Farina <sidhayn@gmail.com>
Date:   Fri Feb 24 21:28:40 2012 -0500

    compat-wireless: replace modprobe -l with functional equivilent

Fix the regression by properly using brackets on the
conditional check and also guaranteeing we output something
upon success. Not sure how this could have worked.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Makefile

index bea01ad26029775dc7cfd3d81fa09bd9a8fb34df..6b6f097475b5ea80e6bb03deac83243913fcaff0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -146,7 +146,7 @@ install-scripts:
        @install scripts/athload        $(DESTDIR)/usr/sbin/
        @install scripts/b43load        $(DESTDIR)/usr/sbin/
        @install scripts/iwl-load       $(DESTDIR)/usr/sbin/
-       @if $(modinfo ath_pci > /dev/null 2>&1); then \
+       @if [ $(shell modinfo ath_pci > /dev/null 2>&1 && echo 1) ]; then \
                echo -n "Note: madwifi detected, we're going to disable it. "  ;\
                echo "If you would like to enable it later you can run:"  ;\
                echo "    sudo athenable madwifi"  ;\
@@ -154,7 +154,7 @@ install-scripts:
                echo Running athenable ath5k...;\
                $(DESTDIR)/usr/sbin/athenable ath5k ;\
        fi
-       @if $(modinfo iwl4965 > /dev/null 2>&1); then \
+       @if [ $(shell modinfo iwl4965 > /dev/null 2>&1 && echo 1) ]; 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:"  ;\
@@ -163,7 +163,7 @@ install-scripts:
                echo Running iwl-enable iwlagn...;\
                $(DESTDIR)/usr/sbin/iwl-enable iwlagn ;\
        fi
-       @if $(modinfo atl1c > /dev/null 2>&1); then \
+       @if [ $(shell modinfo atl1c > /dev/null 2>&1 && echo 1) ]; then \
                echo ;\
                echo -n "Note: atl1c detected, we're going to disable it. "  ;\
                echo "If you would like to enable it later you can run:"  ;\