-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathssvcfg.sh
More file actions
executable file
·35 lines (30 loc) · 790 Bytes
/
ssvcfg.sh
File metadata and controls
executable file
·35 lines (30 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#/bin/bash
KVERSION="`uname -r`"
kern_mod=/lib/modules/$KVERSION/kernel/drivers/net/wireless/ssv6200/ssvdevicetype.ko
type_str=`lsmod | grep "ssvdevicetype"`
cfg_file=sta.cfg
if [ $# -ge 1 ]; then
cfg_file=$1;
echo Using configuration file $1
else
echo Using default configuration file $cfg_file \($?\)
fi
cfg_cmds=(`cat sta.cfg | grep '^[a-zA-Z0-9]' | sed 's/ //g'`)
#echo ${#cfg_cmds[*]}
#echo ${!cfg_cmds[*]}
#echo ${cfg_cmds[1]}
if [ "$type_str" != "" ]; then
#rmmod ssv6200_sdio
#rmmod ssv6200s_core
#rmmod ssv6200_hci
rmmod ssvdevicetype
fi
if [ -f $kern_mod ]; then
insmod $kern_mod stacfgpath="$cfg_file"
#insmod $kern_mod
#./cli cfg reset
#for cmd in ${cfg_cmds[*]}
#do
#./cli cfg `echo $cmd | sed 's/=/ = /g'`
#done
fi