diff options
author | Harald Hoyer <harald@redhat.com> | 2018-01-19 12:35:16 +0100 |
---|---|---|
committer | Stéphane Lesimple <speed47_github@speed47.net> | 2018-01-20 11:19:34 +0100 |
commit | ccc0453df73150b3f50b47ab343561e44ceed639 (patch) | |
tree | 00447e912a7766cf7ab9bbec544cc86e687c7c0d | |
parent | 14ca49a042a20dcc6b5ad9222fa543780be1fe61 (diff) | |
download | spectre-meltdown-checker-ccc0453df73150b3f50b47ab343561e44ceed639.tar.lz spectre-meltdown-checker-ccc0453df73150b3f50b47ab343561e44ceed639.tar.xz spectre-meltdown-checker-ccc0453df73150b3f50b47ab343561e44ceed639.zip |
search in /lib/modules/$(uname -r) for vmlinuz, config, System.map
On Fedora machines /lib/modules/$(uname -r) has all the files.
-rwxr-xr-x | spectre-meltdown-checker.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index ea19de0..fc09ef4 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -586,6 +586,7 @@ if [ "$opt_live" = 1 ]; then fi # if we didn't find a kernel, default to guessing if [ ! -e "$opt_kernel" ]; then + [ -e /lib/modules/$(uname -r)/vmlinuz ] && opt_kernel=/lib/modules/$(uname -r)/vmlinuz [ -e /boot/vmlinuz ] && opt_kernel=/boot/vmlinuz [ -e /boot/vmlinuz-linux ] && opt_kernel=/boot/vmlinuz-linux [ -e /boot/vmlinuz-linux-libre ] && opt_kernel=/boot/vmlinuz-linux-libre @@ -599,6 +600,8 @@ if [ "$opt_live" = 1 ]; then # system.map if [ -e /proc/kallsyms ] ; then opt_map="/proc/kallsyms" + elif [ -e /lib/modules/$(uname -r)/System.map ] ; then + opt_map=/lib/modules/$(uname -r)/System.map elif [ -e /boot/System.map-$(uname -r) ] ; then opt_map=/boot/System.map-$(uname -r) fi @@ -609,6 +612,8 @@ if [ "$opt_live" = 1 ]; then gunzip -c /proc/config.gz > $dumped_config # dumped_config will be deleted at the end of the script opt_config=$dumped_config + elif [ -e /lib/modules/$(uname -r)/config ]; then + opt_config=/lib/modules/$(uname -r)/config elif [ -e /boot/config-$(uname -r) ]; then opt_config=/boot/config-$(uname -r) fi |