Improve multi-line kernel ident parsing
Instead of blindly grabbing the line with 'Version string' and the following one from the core info file, take all lines after 'Version string' until the one one that matches the field format in the core info file. This provides compatibility with VendorBSD modifications that have a different kernel ident format. Reviewed by: jhb
This commit is contained in:
parent
d9514f6739
commit
7ad50a360b
@ -45,10 +45,11 @@ find_kernel()
|
||||
nextline=1
|
||||
next
|
||||
}
|
||||
// {
|
||||
if (nextline) {
|
||||
print
|
||||
nextline==1 {
|
||||
if ($0 ~ "^ [A-Za-z ]+: ") {
|
||||
nextline=0
|
||||
} else {
|
||||
print
|
||||
}
|
||||
}' $INFO)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user