~ubuntu-branches/ubuntu/precise/linux-backports-modules-3.2.0/precise

« back to all changes in this revision

Viewing changes to updates/cw-3.3/scripts/athenable

  • Committer: Package Import Robot
  • Author(s): Leann Ogasawara
  • Date: 2012-02-15 08:42:08 UTC
  • Revision ID: package-import@ubuntu.com-20120215084208-2gcs2zosufz014pi
Tags: 3.2.0-18.1
* Open Precise LBM
* Add compat-wireless v3.3
* Consolidated amd64 server flavour into generic
* Remove lpia control file
* Update Vcs-Git to ubuntu-preicse-lbm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Copyright 2007        Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
 
4
#
 
5
# Makes sure either ath5k or MadWifi are ready to be used. This allows
 
6
# us to choose any driver without blacklisting each other.
 
7
 
 
8
. /usr/lib/compat-wireless/modlib.sh
 
9
 
 
10
if [[ $UID -ne 0 ]]; then
 
11
        echo "Run with root privileges"
 
12
        exit
 
13
fi
 
14
 
 
15
ATH5K="ath5k"
 
16
ATH9K="ath9k"
 
17
MADWIFI="ath_pci"
 
18
# Appended to module file at the end when we want to ignore one
 
19
IGNORE_SUFFIX=".ignore"
 
20
USAGE="Usage: $0 [ ath5k | madwifi ]"
 
21
 
 
22
# Default behavior: disables any MadWifi driver present and makes sure
 
23
# ath5k is enabled
 
24
if [ $# -eq 0 ]; then
 
25
        module_disable $MADWIFI
 
26
        module_enable $ATH5K
 
27
        module_enable $ATH9K
 
28
        exit
 
29
elif [ $# -ne 1 ]; then
 
30
        echo "$USAGE"
 
31
        exit
 
32
fi
 
33
 
 
34
MODULE=$1
 
35
if [ "$MODULE" == "ath5k" ]; then
 
36
        module_disable $MADWIFI
 
37
        module_enable $ATH5K
 
38
        module_enable $ATH9K
 
39
elif [ "$MODULE" == "madwifi" ]; then
 
40
        module_disable $ATH5K
 
41
        module_disable $ATH9K
 
42
        module_enable $MADWIFI
 
43
else
 
44
        echo "$USAGE"
 
45
        exit
 
46
fi