View Single Post
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#551
Originally Posted by karam View Post
@Saturn

i have made an application for MDK3
called Wifi-Pwner

i modified your load.sh a bit to include all the versions of KP installed

Code:
#!/bin/sh

kernel=$(uname -r)

# defaults
if [ "$kernel" == "2.6.28.10-power49" ]; then
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp-old"
else
if [ "$kernel" == "2.6.28.10-power48" ]; then
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp-old"
else
if [ "$kernel" == "2.6.28.10-power47" ]; then
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp-old"
else
if [ "$kernel" == "2.6.28.10-power46-wl" ]; then
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp-old"
else
if [ "$kernel" == "2.6.28.10-power40-wl" ]; then
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp-old"
else
DRIVERPATH="/opt/wifi-pwner/compat-wireless/kp"
fi
fi
fi
fi
fi
where
kp-old: has the old drivers
kp: has the new ones

hope it helps
Thanks, but in cleven I do the selection from python.

two comments on your script:

- use the "-o" option with the if to reduce the spaggeti code. e.g. if [ a == "1" -o b == "2" ] ... In general, try to avoid nested ifs.
- you will load the new drivers even for non valid kernels.

hope it helps.

Last edited by Saturn; 2012-04-16 at 20:26.
 

The Following 2 Users Say Thank You to Saturn For This Useful Post: