Commit 25788e33 authored by phenigma's avatar phenigma
Browse files

Refs #2812 - use natural version option on sort to find most recent kernel version.

parent 1fce6fd7
......@@ -3,7 +3,7 @@
## Put a kernel image in there
mkdir -p /tftpboot/default
cd /lib/modules
KERNEL=$(find * -maxdepth 0 -type d |sort -r |head -1)
KERNEL=$(find * -maxdepth 0 -type d |sort -rV |head -1)
cp /boot/vmlinuz-$KERNEL /tftpboot/default/vmlinuz
chmod +r /tftpboot/default/vmlinuz
mkinitramfs -d /etc/initramfs-tools-interactor/ -o /tftpboot/default/initrd $KERNEL
......@@ -28,7 +28,7 @@ HOST_RELEASE=$(lsb_release -c -s)
HOST_ARCH=$(apt-config dump | grep 'APT::Architecture' | sed 's/.*"\(.*\)".*/\1/g' | head -1)
#Assign latest installed kernel and not running kernel
HOST_KVER=$(find /lib/modules/* -maxdepth 0 -type d |sort -r |head -1)
HOST_KVER=$(find /lib/modules/* -maxdepth 0 -type d |sort -rV |head -1)
#host file locations
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment