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,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
do_stm32_autoflash() {
|
||||
# launch STM32 flash utility
|
||||
[ -e "/sys/r2ec/reset" -a -f /usr/bin/autoflash ] && {
|
||||
/usr/bin/autoflash
|
||||
}
|
||||
}
|
||||
|
||||
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_stm32_autoflash
|
|
@ -0,0 +1,20 @@
|
|||
set_state() {
|
||||
local label="$1"
|
||||
local disable
|
||||
|
||||
[ -e "/sys/class/gpio/${label}_power/value" ] || return
|
||||
|
||||
config_get disable ${label} disable
|
||||
[ "${disable}" -eq 1 ] && \
|
||||
/sbin/mctl -s -m "${label}" || \
|
||||
/sbin/mctl -p -m "${label}"
|
||||
}
|
||||
|
||||
do_power_modem() {
|
||||
[ -z "$(uci -q get system.modem.disable)" ] && /sbin/mctl -p || {
|
||||
config_load system
|
||||
config_foreach set_state mctl
|
||||
}
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_power_modem
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
|
||||
do_check_version() {
|
||||
version="$(uci -q get system.@system[0].device_fw_version)"
|
||||
[ -z "$version" ] && {
|
||||
return 0
|
||||
}
|
||||
|
||||
numeric_version="${version##*_}"
|
||||
client_removed="${numeric_version#*.}"
|
||||
major="${client_removed%%.*}"
|
||||
|
||||
[ -f /sysupgrade.tgz ] && [ -n "$major" ] && [ "$major" -lt 2 ] && {
|
||||
echo "- migration work -"
|
||||
cp /rom/etc/inittab /etc/inittab
|
||||
}
|
||||
}
|
||||
|
||||
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_check_version
|
Loading…
Add table
Add a link
Reference in a new issue