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:
Ed Maste 2012-03-07 18:46:21 +00:00
parent d9514f6739
commit 7ad50a360b

View File

@ -45,10 +45,11 @@ find_kernel()
nextline=1
next
}
// {
if (nextline) {
print
nextline==1 {
if ($0 ~ "^ [A-Za-z ]+: ") {
nextline=0
} else {
print
}
}' $INFO)