Accept + within kernel versions
This commit is contained in:
committed by
Jonathon Anderson
parent
2dfd28cb6c
commit
5bb73c90c5
@@ -56,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Changed
|
||||
|
||||
- Explicitly ignore compat-style NIS lines in passwd/group during syncuser. #1286
|
||||
- Accept `+` within kernel version. #1268
|
||||
|
||||
## v4.5.4, 2024-06-12
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user