I know that I asked you to report this problem but now that I recall the use case for the code I don't think it's a bug.
If you don't pass the -k parameter to update-initramfs, it uses the latest kernel by default.
In the following code, the initramfs is always called for the latest kernel, however if you're installing the driver after booting from an older kernel (which therefore is your current kernel), the initramfs for this kernel will be updated too.
ALTERNATIVE=$(readlink /etc/alternatives/gl_conf)
if [ "$ALTERNATIVE" = "/usr/lib/nvidia-current/ld.so.conf" ]; then
# Update initramfs so that the blacklist ends up in the initramfs update-initramfs -u
if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then update-initramfs -u -k $CURRENT_KERNEL
fi
fi
I know that I asked you to report this problem but now that I recall the use case for the code I don't think it's a bug.
If you don't pass the -k parameter to update-initramfs, it uses the latest kernel by default.
In the following code, the initramfs is always called for the latest kernel, however if you're installing the driver after booting from an older kernel (which therefore is your current kernel), the initramfs for this kernel will be updated too.
if [ "$ALTERNATIVE" = "/usr/lib/
# Update initramfs so that the blacklist ends up in the initramfs
if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
update- initramfs -u -k $CURRENT_KERNEL
fi
fi