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