# Look for the most recent kernel named vmlinuz-*.<arch>* which has a
# corresponding directory in /lib/modules/. If the architecture is x86, look
# for any x86 kernel.
# Look for the most recent kernel named vmlinuz-*.<arch>* which has a
# corresponding directory in /lib/modules/. If the architecture is x86, look
# for any x86 kernel.
b=$(basename "$f")
b=$(echo "$b" | sed 's,vmlinuz-,,')
modpath="/lib/modules/$b"
b=$(basename "$f")
b=$(echo "$b" | sed 's,vmlinuz-,,')
modpath="/lib/modules/$b"