From bcca823f1100c29340e81ef77a86220e6a1c1e45 Mon Sep 17 00:00:00 2001 From: macie Date: Sat, 8 Feb 2025 12:35:41 +0100 Subject: [PATCH] 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. --- include/osdetection | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/osdetection b/include/osdetection index 7a2e4bf1..ac9a9c86 100644 --- a/include/osdetection +++ b/include/osdetection @@ -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"