Add Unraid support and fix lscpu parsing for colon-separated fields
All checks were successful
Build-Publish / build (linux/amd64) (push) Successful in 5s
Build-Publish / build (linux/arm64) (push) Successful in 12s
Build-Publish / create-manifest (push) Successful in 2s
Build-Publish / publish-template (push) Successful in 15s

This commit is contained in:
j
2026-03-08 16:39:04 +13:00
parent 4428ed60c4
commit f953eef8cf
2 changed files with 14 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ detect_os() {
debian|ubuntu|raspbian) echo "debian" ;;
alpine) echo "alpine" ;;
openwrt) echo "openwrt" ;;
unraid-os|slackware) echo "unraid" ;;
*) echo "unknown" ;;
esac
elif [ -f /etc/openwrt_release ]; then
@@ -68,6 +69,9 @@ create_user() {
mkdir -p "/home/$USERNAME"
chown "$USERNAME" "/home/$USERNAME"
;;
unraid)
useradd -m -s /bin/bash "$USERNAME" 2>/dev/null || true
;;
*)
useradd --system --create-home --shell /bin/bash "$USERNAME" 2>/dev/null || \
adduser --system --group --shell /bin/bash --home "/home/$USERNAME" "$USERNAME"
@@ -180,6 +184,10 @@ install_packages() {
# Best-effort - not all packages exist on all architectures
opkg install sudo lm-sensors pciutils ip-full coreutils-stat 2>/dev/null || true
;;
unraid)
# Unraid ships with most tools pre-installed
echo "Unraid detected - tools are pre-installed"
;;
*)
echo "Warning: unknown OS, skipping package install"
echo "Manually install: lm-sensors pciutils iproute2 util-linux"