1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Remove ipq40xx customization

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-09-29 15:05:43 +02:00
parent 46d5683e1d
commit a93d9cba68
83 changed files with 0 additions and 13379 deletions

View file

@ -1,26 +0,0 @@
#!/bin/sh
SECTION="hwinfo"
CONFIG="hwinfo"
get_hw_info() {
param=$(/sbin/mnf_info "--name")
[ -n "$param" -a ${#param} == 12 ] && uci set "system"."@system[0]"."device_code"=$param
hostname=${param:0:6}
[ -n "$hostname" -a ${#hostname} == 6 -a -z "$(uci -q get system.@system[0].hostname)" ] && uci set "system"."@system[0]"."hostname"=OpenMPTCProuter
routername=${param:0:6}
[ -n "$routername" -a ${#routername} == 6 -a -z "$(uci -q get system.@system[0].routername)" ] && uci set "system"."@system[0]"."routername"=$routername
version=$(cat /etc/version)
[ -n "$version" ] && uci set "system"."@system[0]"."device_fw_version"=$version
uci commit "system"
}
# get device information
echo "Reading device information"
get_hw_info
exit 0

View file

@ -1,34 +0,0 @@
#!/bin/sh
. /lib/functions.sh
move_network(){
local section=$1
local device ports vlan
config_get ports "$section" ports
config_get device "$section" device
config_get vlan "$section" vlan
[ "$vlan" -eq 1 ] && {
if list_contains "ports" "0t" && list_contains "ports" "5"; then
uci_set network "$section" ports "${ports/0t/0}"
uci_set network "$section" vlan "2"
uci_remove network "$section" vid
fi
}
[ "$vlan" -eq 2 ] && {
if list_contains ports "0t"; then
echo "Contains"
uci_set network "$section" ports "${ports/0t/0}"
uci_set network "$section" vlan "1"
uci_remove network "$section" vid
fi
}
}
config_load network
config_foreach move_network switch_vlan
uci_commit network
exit 0