4 if ! test -f /lib/modules/${1}/modules.dep; then
6 elif ! test -f /boot/vmlinuz-${1}; then
9 echo -n "Generating initramfs image for kernel ${1} ... "
10 /sbin/dracut --force /boot/initramfs-${1}.img ${1} 1>/dev/null 2>&1
12 echo "
\e[1;31mFailed
\e[0m"
15 echo "
\e[1;32mOK
\e[0m"
22 if [ "x${1}" = "x" ]; then
23 echo "Usage: update-initramfs <all | kernel version>"
25 echo " update-initramfs all"
26 echo " update-initramfs 5.10.138-5.10-1"
28 elif [ "x${1}" = "xall" ]; then
29 for kernel in $(/bin/ls -1 /lib/modules/ 2>/dev/null); do
30 create_initramfs ${kernel}