mirror of
https://github.com/routerich/RouterichAX3000_configs.git
synced 2025-12-24 16:18:06 +03:00
Add check version OpenWRT
This commit is contained in:
@@ -475,6 +475,22 @@ else
|
||||
is_reconfig_podkop="n"
|
||||
fi
|
||||
|
||||
|
||||
#####after test delete
|
||||
DESCRIPTION=$(ubus call system board | jsonfilter -e '@.release.description')
|
||||
VERSION=$(ubus call system board | jsonfilter -e '@.release.version')
|
||||
findKey="RouteRich"
|
||||
findVersion="24.10.2"
|
||||
|
||||
if echo "$DESCRIPTION" | grep -qi -- "$findKey" && printf '%s\n%s\n' "$findVersion" "$VERSION" | sort -V | tail -n1 | grep -qx -- "$VERSION"; then
|
||||
printf "\033[32;1mThis new firmware. Running scprit...\033[0m\n"
|
||||
else
|
||||
printf "\033[32;1mThis old firmware.\nTo use this script, update your firmware to the latest version....\033[0m\n"
|
||||
exit 1
|
||||
fi
|
||||
####after test delete
|
||||
|
||||
|
||||
echo "Update list packages..."
|
||||
opkg update
|
||||
|
||||
|
||||
Reference in New Issue
Block a user