From 92766631466b7e98278f28a7846d0cba71bc94d8 Mon Sep 17 00:00:00 2001 From: DualFroz Date: Wed, 26 Aug 2026 16:26:08 +0200 Subject: [PATCH] tools.func: fix mongodb version check, leading "v" never stripped is_tool_installed parsed `mongod --version` ("db version v8.0.15") into "v8.0" because the leading v was left in place. It never equals the target "8.0", so setup_mongodb always took the clean-upgrade path and purged mongodb-org on every run. On Omada that also drags omadac out as a reverse-dependency, wiping the controller. Strip the v like the node and go branches already do, so an unchanged version compares equal and setup_mongodb just updates in place. --- misc/tools.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index bfe6cba..dde04c7 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -632,7 +632,7 @@ is_tool_installed() { ;; mongodb | mongod) if command -v mongod >/dev/null 2>&1; then - installed_version=$(mongod --version 2>/dev/null | awk '/db version/{print $3}' | cut -d. -f1,2) + installed_version=$(mongod --version 2>/dev/null | awk '/db version/{print $3}' | sed 's/^v//' | cut -d. -f1,2) fi ;; node | nodejs)