We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b01ddb commit 5920a68Copy full SHA for 5920a68
ubuntukernel-load.sh
@@ -106,8 +106,8 @@ fixup_shutdown_initrd() {
106
}
107
108
get_kernel_version() {
109
- # last linux-image-* package in the list is the current kernel
110
- UBUNTU_KERNEL_VERSION=$(dpkg -l "linux-image*"|grep ^ii| tail -1 |awk '{print $2}'|cut -f3- -d-)
+ # i guess /vmlinuz always points to the current kernel
+ UBUNTU_KERNEL_VERSION=$(readlink /vmlinuz | cut -f2- -d-)
111
if [ -r $UBUNTU_KERNEL_STAMP ] ; then
112
INITRD_KERNEL_VERSION=$(cat $UBUNTU_KERNEL_STAMP)
113
fi
0 commit comments