mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Fix RUTX support
This commit is contained in:
parent
6fc4d11e09
commit
0b14e36374
98 changed files with 11611 additions and 893 deletions
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/board.sh
|
||||
|
||||
|
||||
set_pin() {
|
||||
local sim="$1"
|
||||
local modem position num builtin
|
||||
|
||||
config_get modem "$sim" modem
|
||||
builtin=$(is_builtin_modem "$modem")
|
||||
[ "$builtin" = "0" ] && return
|
||||
|
||||
config_get position "$sim" position
|
||||
#If modem builtin and primary then position num 3 or 4 else 1 or 2
|
||||
[ "$builtin" = "2" ] && num=$((position + 2)) || num=$position
|
||||
|
||||
pin=`/sbin/mnf_info --simpin $num`
|
||||
[ -z "$pin" ] && return
|
||||
|
||||
uci -q set "simcard"."$sim"."pincode"="$pin"
|
||||
}
|
||||
|
||||
config_load simcard
|
||||
config_foreach set_pin sim
|
||||
uci commit simcard
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue