updated on Fri Jan 13 16:00:36 UTC 2012
[aur-mirror.git] / linux-bede / linux-bede.install
blob5eaf76971b92c2d4dbb0a551a7deb560d5a2d7b8
1 # arg 1:  the new package version
2 # arg 2:  the old package version
4 KERNEL_NAME=-bede
5 KERNEL_VERSION=3.2.0-3-BEDE
7 post_install () {
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   # add compat symlinks for the initramfs images
15   ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
16   ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
17     boot/kernel26${KERNEL_NAME}-fallback.img
20 post_upgrade() {
21   pacman -Q grub &>/dev/null
22   hasgrub=$?
23   pacman -Q grub2 &>/dev/null
24   hasgrub2=$?
25   pacman -Q lilo &>/dev/null
26   haslilo=$?
27   # reminder notices
28   if [ $haslilo -eq 0 ]; then
29     echo ">>>"
30     if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
31       echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
32     else
33       echo ">>> You appear to be using the LILO bootloader. You should run"
34       echo ">>> 'lilo' before rebooting."
35     fi
36     echo ">>>"
37   fi
39   if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
40     if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
41       echo "WARNING: /boot appears to be a seperate partition but is not mounted"
42       echo "         This is most likely not what you want.  Please mount your /boot"
43       echo "         partition and reinstall the kernel unless you are sure this is OK"
44     fi
45   fi
47   # updating module dependencies
48   echo ">>> Updating module dependencies. Please wait ..."
49   depmod ${KERNEL_VERSION}
50   echo ">>> Generating initial ramdisk, using mkinitcpio.  Please wait..."
51   mkinitcpio -p linux${KERNEL_NAME}
54 post_remove() {
55   # also remove the compat symlinks
56   rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
57   rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img