Merge pull request #7792 from wanyaoqi/automated-cherry-pick-of-#7789-upstream-release-3.2

Automated cherry pick of #7789: fix get ubuntu version
This commit is contained in:
yunion-ci-robot
2020-09-07 20:59:44 +08:00
committed by GitHub
+1 -1
View File
@@ -764,7 +764,7 @@ func (d *SUbuntuRootFs) GetReleaseInfo(rootFs IDiskPartition) *deployapi.Release
lines := strings.Split(string(rel), "\n")
for _, l := range lines {
if strings.HasPrefix(l, distroKey) {
version = strings.TrimSpace(l[len(distroKey) : len(l)-1])
version = strings.TrimSpace(l[len(distroKey):])
}
}
return deployapi.NewReleaseInfo(d.GetName(), version, d.GetArch(rootFs))