← back to Exo
NetworkSetupHelper: detect stale startup script content
5ab1f8b3e2a13f2f05c2462c6cf9417bc09f7f97 · 2026-01-19 17:09:57 +0000 · Jake Hillion
The daemonAlreadyInstalled() function checked that the startup script
file existed and validated plist properties, but did not compare the
actual script content. If the setupScript constant was updated in a new
app version, the stale on-disk script would not be detected or replaced.
Added a guard clause that reads the installed script from disk and
compares it against the expected setupScript content (with whitespace
normalization). When content differs, the function returns false,
triggering the reinstallation flow with an admin privileges prompt.
Test plan:
- Installed on a cluster that had the previous network config. Got the
popup asking for permissions. After accepting I could run Kimi K2
Thinking Tensor RDMA on all 4 nodes.
Files touched
M app/EXO/EXO/Services/NetworkSetupHelper.swift
Diff
commit 5ab1f8b3e2a13f2f05c2462c6cf9417bc09f7f97
Author: Jake Hillion <jake@hillion.co.uk>
Date: Mon Jan 19 17:09:57 2026 +0000
NetworkSetupHelper: detect stale startup script content
The daemonAlreadyInstalled() function checked that the startup script
file existed and validated plist properties, but did not compare the
actual script content. If the setupScript constant was updated in a new
app version, the stale on-disk script would not be detected or replaced.
Added a guard clause that reads the installed script from disk and
compares it against the expected setupScript content (with whitespace
normalization). When content differs, the function returns false,
triggering the reinstallation flow with an admin privileges prompt.
Test plan:
- Installed on a cluster that had the previous network config. Got the
popup asking for permissions. After accepting I could run Kimi K2
Thinking Tensor RDMA on all 4 nodes.
---
app/EXO/EXO/Services/NetworkSetupHelper.swift | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/app/EXO/EXO/Services/NetworkSetupHelper.swift b/app/EXO/EXO/Services/NetworkSetupHelper.swift
index fa3d4802..28931ead 100644
--- a/app/EXO/EXO/Services/NetworkSetupHelper.swift
+++ b/app/EXO/EXO/Services/NetworkSetupHelper.swift
@@ -112,6 +112,13 @@ enum NetworkSetupHelper {
let scriptExists = manager.fileExists(atPath: scriptDestination)
let plistExists = manager.fileExists(atPath: plistDestination)
guard scriptExists, plistExists else { return false }
+ guard
+ let installedScript = try? String(contentsOfFile: scriptDestination, encoding: .utf8),
+ installedScript.trimmingCharacters(in: .whitespacesAndNewlines)
+ == setupScript.trimmingCharacters(in: .whitespacesAndNewlines)
+ else {
+ return false
+ }
guard
let data = try? Data(contentsOf: URL(fileURLWithPath: plistDestination)),
let plist = try? PropertyListSerialization.propertyList(
← 2202685c refactor all information sources (including ipless rdma disc
·
back to Exo
·
Wrap pipeline models for explicit mx.depends between cache a 5fd55594 →