summaryrefslogtreecommitdiff
path: root/libre/linux-libre/linux-libre.install
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-08-06 19:04:09 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-08-06 19:04:09 -0300
commit716b086f2ce4a4c37fa1111df55bc5c40c29c8b7 (patch)
treed1fd758973d2f520a08513cc9af83c348e464e9d /libre/linux-libre/linux-libre.install
parent2f151ac8a29a733398b5294f1574cc00e454885e (diff)
libre/linux-libre-3.0.1-2
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() {