summaryrefslogtreecommitdiff
path: root/libre/linux-libre/linux-libre.install
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre/linux-libre.install')
-rw-r--r--libre/linux-libre/linux-libre.install16
1 files changed, 12 insertions, 4 deletions
diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install
index 64ea2d1bf..1de64b640 100644
--- a/libre/linux-libre/linux-libre.install
+++ b/libre/linux-libre/linux-libre.install
@@ -11,10 +11,18 @@ post_install () {
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
mkinitcpio -p linux-libre${KERNEL_NAME}
- # add compat symlinks for the initramfs images
- ln -sf initramfs-linux-libre${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
- ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img \
- boot/kernel26${KERNEL_NAME}-fallback.img
+ # compat symlinks for the official kernels only
+ if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then
+ loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)"
+ [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf"
+ if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then
+ # add compat symlinks for the initramfs images
+ ln -sf initramfs-linux-libre${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
+ ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img \
+ boot/kernel26${KERNEL_NAME}-fallback.img
+ ln -sf vmlinuz-linux-libre${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME}
+ fi
+ fi
}
post_upgrade() {