1 # arg 1: the new package version
2 # arg 2: the old package version
5 KERNEL_VERSION=3.0.3-rt
8 # updating module dependencies
9 echo ">>> Updating module dependencies. Please wait ..."
10 depmod ${KERNEL_VERSION}
11 echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
12 mkinitcpio -p linux${KERNEL_NAME}
14 # compat symlinks for the official kernels only
15 if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then
16 loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)"
17 [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf"
18 if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then
19 # add compat symlinks for the initramfs images
20 ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
21 ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
22 boot/kernel26${KERNEL_NAME}-fallback.img
23 ln -sf vmlinuz-linux${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME}
29 pacman -Q grub &>/dev/null
31 pacman -Q grub2 &>/dev/null
33 pacman -Q lilo &>/dev/null
36 if [ $haslilo -eq 0 ]; then
38 if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
39 echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
41 echo ">>> You appear to be using the LILO bootloader. You should run"
42 echo ">>> 'lilo' before rebooting."
47 if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
48 if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
49 echo "WARNING: /boot appears to be a seperate partition but is not mounted"
50 echo " This is most likely not what you want. Please mount your /boot"
51 echo " partition and reinstall the kernel unless you are sure this is OK"
55 # updating module dependencies
56 echo ">>> Updating module dependencies. Please wait ..."
57 depmod ${KERNEL_VERSION}
58 echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
59 mkinitcpio -p linux${KERNEL_NAME}
63 # also remove the compat symlinks
64 rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
65 rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img