mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-12-22 04:13:38 +01:00
fix: bsd: kernel version detection
This commit is contained in:
parent
dbe208fc48
commit
44223c5308
@ -2600,7 +2600,7 @@ else
|
|||||||
kernel_version=$("${opt_arch_prefix}strings" "$kernel" 2>/dev/null | grep -E \
|
kernel_version=$("${opt_arch_prefix}strings" "$kernel" 2>/dev/null | grep -E \
|
||||||
-e '^Linux version ' \
|
-e '^Linux version ' \
|
||||||
-e '^[[:alnum:]][^[:space:]]+ \([^[:space:]]+\) #[0-9]+ .+ (19|20)[0-9][0-9]$' \
|
-e '^[[:alnum:]][^[:space:]]+ \([^[:space:]]+\) #[0-9]+ .+ (19|20)[0-9][0-9]$' \
|
||||||
-e '^FreeBSD [0-9]' | head -1)
|
-e '^FreeBSD [0-9]' | grep -v 'ABI compat' | head -1)
|
||||||
if [ -z "$kernel_version" ]; then
|
if [ -z "$kernel_version" ]; then
|
||||||
# try even harder with some kernels (such as ARM) that split the release (uname -r) and version (uname -v) in 2 adjacent strings
|
# try even harder with some kernels (such as ARM) that split the release (uname -r) and version (uname -v) in 2 adjacent strings
|
||||||
kernel_version=$("${opt_arch_prefix}strings" "$kernel" 2>/dev/null | grep -E -B1 '^#[0-9]+ .+ (19|20)[0-9][0-9]$' | tr "\n" " ")
|
kernel_version=$("${opt_arch_prefix}strings" "$kernel" 2>/dev/null | grep -E -B1 '^#[0-9]+ .+ (19|20)[0-9][0-9]$' | tr "\n" " ")
|
||||||
|
Loading…
Reference in New Issue
Block a user