Accept + within kernel versions

This commit is contained in:
David McFarlane
2024-06-18 11:06:29 +10:00
committed by Jonathon Anderson
parent 2dfd28cb6c
commit 5bb73c90c5
2 changed files with 2 additions and 1 deletions

View File

@@ -252,7 +252,7 @@ func FindKernel(root string) (kPath string, version string, err error) {
}
for _, foundKernel := range potentialKernel {
wwlog.Debug("Parsing out kernel version for %s", foundKernel)
re := regexp.MustCompile(fmt.Sprintf(path.Join(root, searchPath), `([\w\d-\.]*)`))
re := regexp.MustCompile(fmt.Sprintf(path.Join(root, searchPath), `([\w\d-\.+]*)`))
version := re.FindAllStringSubmatch(foundKernel, -1)
if version == nil {
return foundKernel, "", fmt.Errorf("could not parse kernel version")