1 # arg 1: the new package version
2 # arg 2: the old package version
5 KERNEL_VERSION=3.1.8-1-pae
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 findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
48 echo "WARNING: /boot appears to be a separate partition but is not mounted."
49 echo " You probably just broke your system. Congratulations."
52 # updating module dependencies
53 echo ">>> Updating module dependencies. Please wait ..."
54 depmod ${KERNEL_VERSION}
55 echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
56 mkinitcpio -p linux${KERNEL_NAME}
60 # also remove the compat symlinks
61 rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
62 rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img