You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.1 KiB
Bash

#!/bin/sh
. $MIGTEST/lib/migration/migration.sh
$LOG_TOOL "downgrade from v2.3.0 to v2.2.2"
. /lib/functions.sh
# if socketman was enabled, we need to do a factory reset
local smd
config_load socketman
config_get smd service disabled
if [ "$smd" != "1" ]; then
rm -rf /overlay/upper/*
reboot
exit 0
fi
# remove multicast_querier option again
unfix_bridge() {
local config="$1"
local type
config_get type "$config" type
[ "$type" = "bridge" ] && $UCI_TOOL -q delete network."$config".multicast_querier
}
config_load network
config_foreach unfix_bridge interface
$UCI_TOOL commit network
# led names for APs
led_sysfs() {
local config="$1"
local sysfs
local new
config_get sysfs "$config" sysfs
case "$sysfs" in
dvl1200e*)
new=ew7479wac
;;
dvl1750e*)
new=ew7679wac
;;
dvl1200i*)
new=ew7479wic
;;
dvl1750i*)
new=ew7679wic
;;
dvl1750c*)
new=ew7679cap
;;
dvl1750x*)
new=ew7679oap
;;
*)
return
;;
esac
$UCI_TOOL -q set system."$config".sysfs="$new:${sysfs#*:}"
}
config_load system
config_foreach led_sysfs led
$UCI_TOOL commit system
exit 0