Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbaf6a0da9 | ||
|
|
9a4c7d57a8 |
No files matched your search
@@ -337,6 +337,15 @@ func otaDownloadOne(url, dst, wantSHA string) error {
|
||||
return fmt.Errorf("sha256 mismatch: got %s", got)
|
||||
}
|
||||
}
|
||||
// 下载文件默认不带执行位(os.Create 跟随 umask,通常 0644),而 preflightBinary
|
||||
// 在 replaceBinary 的 chmod 之前就要试运行它;Linux 下不显式加 +x 会 EACCES(Permission denied)。
|
||||
// 故此处下载落盘后即补执行位,确保 preflight 与最终 replace 都能 exec。
|
||||
if runtime.GOOS != "windows" {
|
||||
if err := os.Chmod(dst, 0o755); err != nil {
|
||||
_ = os.Remove(dst)
|
||||
return fmt.Errorf("chmod downloaded binary: %w", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -63,7 +63,9 @@ type nodeProbeRec struct {
|
||||
// dnssec 属功能性校验(结果是否签名/可信),不逐条进明细,只进统计聚合。
|
||||
func nodeIsProbeType(apiType string) bool {
|
||||
switch apiType {
|
||||
case "tcping", "speed", "detail", "ssl", "dns":
|
||||
// 与中心 store.go 的 isProbeType 白名单对齐:location 归属地查询也逐条进明细,
|
||||
// 否则节点只上报 location 统计、不上报明细,导致中心大盘有 Location 统计而明细为空。
|
||||
case "tcping", "speed", "detail", "ssl", "dns", "location":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user