summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/53-vmlinuz_symlink
blob: 6cd08f8bd60971182b226f90cf4c5279a7c3fe1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

echo "Creating kernel and ramdisk symlinks"

# Get version information for the (newest) installed kernel.
KERNEL="`/bin/ls -1 /boot/vmlinuz-* | tail -n 1`"
INITRD="`/bin/ls -1 /boot/initrd.img-* | tail -n 1`"

if [ ! -e /vmlinuz ]; then
   ln -s "$KERNEL" /vmlinuz
fi

if [ ! -e /initrd.img ]; then
   ln -s "$INITRD" /initrd.img
fi