Add script to reinstall all kernels

This commit is contained in:
dalto 2022-11-12 15:54:35 -06:00
parent ab5852d7d3
commit 1cbb1a5bd9
1 changed files with 10 additions and 0 deletions

10
src/usr/bin/reinstall-kernels Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
#
# Calls kernel-install on all kernels found in /usr/lib/modules
#
# Run kernel install for all the installed kernels
while read -r kernel; do
kernelversion=$(basename "${kernel%/vmlinuz}")
echo "Installing kernel ${kernelversion}"
kernel-install add ${kernelversion} ${kernel}
done < <(find /usr/lib/modules -maxdepth 2 -type f -name vmlinuz)