feat: Detect OpenWrt OS

HARDWARE value is a name of compilation target
(SoC type). This will simplify selection of proper installer
version for OS upgrade.
This commit is contained in:
macie 2025-02-08 12:35:41 +01:00
parent 4f7a333a35
commit bcca823f11
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -407,6 +407,12 @@
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_NAME="openSUSE"
;;
"openwrt")
LINUX_VERSION='OpenWrt'
HARDWARE=$(grep '^OPENWRT_BOARD=' /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_NAME=$(grep '^NAME=' /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION=$(grep '^VERSION=' /etc/os-release | awk -F= '{print $2}' | tr -d '"')
;;
"osmc")
LINUX_VERSION="OSMC"
LINUX_VERSION_LIKE="Debian"