updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / kernel26-lts-xen / kernel26-lts-xen.install
blob97ef820030d5278a76337a8d9a45463b430c6ed0
1 # arg 1:  the new package version
2 # arg 2:  the old package version
4 KERNEL_NAME=-lts-xen
5 KERNEL_VERSION=2.6.32.53-1-lts-xen
7 post_install () {
8   # updating module dependencies
9   echo ">>> Updating module dependencies. Please wait ..."
10   /sbin/depmod $KERNEL_VERSION 
11   # generate init ramdisks
12   echo ">>> MKINITCPIO SETUP"
13   echo ">>> ----------------"
14   echo ">>> If you use LVM2, Encrypted root or software RAID,"
15   echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
16   echo ">>> More information about mkinitcpio setup can be found here:"
17   echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
18   echo ""
19   echo ">>> Generating initial ramdisk, using mkinitcpio.  Please wait..."
20   mkinitcpio -p kernel26${KERNEL_NAME}
23 post_upgrade() {
24   pacman -Q grub &>/dev/null
25   hasgrub=$?
26   pacman -Q grub2 &>/dev/null
27   hasgrub2=$?
28   pacman -Q lilo &>/dev/null
29   haslilo=$?
30   # reminder notices
31   if [ $haslilo -eq 0 ]; then
32     echo ">>>"
33     if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
34       echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
35     else
36       echo ">>> You appear to be using the LILO bootloader. You should run"
37       echo ">>> 'lilo' before rebooting."
38     fi
39     echo ">>>"
40   fi
42   if grep "/boot" /etc/fstab 2>&1 >/dev/null; then
43     if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
44       echo "WARNING: /boot appears to be a seperate partition but is not mounted."
45       echo "         You probably just broke your system. Congratulations."
46     fi
47   fi
49   if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
50     # important upgrade notice
51     echo ">>>"
52     echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
53     echo ">>> -------------------------------"
54     echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
55     echo ">>> If you still use DevFS, please make the transition to uDev before"
56     echo ">>> rebooting.  If you really need to stay with DevFS for some reason,"
57     echo ">>> then you can manually downgrade to an older version:"
58     echo ">>>"
59     echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
60     echo ">>>"
61     echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
62     echo ">>> IgnorePkg list in /etc/pacman.conf"
63     echo ">>>"
64     echo ">>> (NOTE: The following portion applies to uDev users as well!)"
65     echo ">>>"
66     echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
67     echo ">>> be able to boot!  Change your root= parameter to use the classic"
68     echo ">>> naming scheme."
69     echo ">>>"
70     echo ">>> EXAMPLES:"
71     echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
72     echo ">>> - change root=/dev/md/0 to root=/dev/md0"
73     echo ">>>"
74   fi
75   # generate new init ramdisk
76   if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
77     echo ">>> --------------------------------------------------------------"
78     echo ">>> |                          WARNING:                          |"
79     echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
80     echo ">>> |              Please change to Mkinitcpio setup.            |"
81     echo ">>> --------------------------------------------------------------"
82     echo ">>>"
83   fi
84   # updating module dependencies
85   echo ">>> Updating module dependencies. Please wait ..."
86   /sbin/depmod $KERNEL_VERSION
87   echo ">>> MKINITCPIO SETUP"
88   echo ">>> ----------------"
89   if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
90     echo ">>> Please change your bootloader config files:"
91     echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
92     echo "------------------------------------------------"
93     echo "| - initrd26.img to kernel26${KERNEL_NAME}.img               |"
94     echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
95     echo "------------------------------------------------"
96   fi
97   if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
98     echo ""
99     echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
100     echo ">>> ----------"
101     echo ">>> To use the new pata drivers, change the 'ide' hook "
102     echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
103     echo ">>> The new system changes: /dev/hd? to /dev/sd?"
104     echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
105     echo ">>> new naming system. "
106     echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
107     echo ""
108     echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
109     echo "----------"
110     echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf" 
111     echo ">>> the 'ata_piix' module will be used."
112     echo ">>> This may cause your devices to shift names, eg:"
113     echo ">>> - IDE: devices from hd? to sd?"
114     echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
115     echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
116     echo ""
117   fi
119   echo ">>> If you use LVM2, Encrypted root or software RAID,"
120   echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
121   echo ">>> More information about mkinitcpio setup can be found here:"
122   echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
123   echo ""
124   echo ">>> Generating initial ramdisk, using mkinitcpio.  Please wait..."
125 if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
126   mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
127 and are using an Intel chipset, append 'earlymodules=piix' to the
128 kernel commandline"
129 else
130   mkinitcpio -p kernel26${KERNEL_NAME}
132 if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
133   echo ""
134   echo "Important ACPI Information:"
135   echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
136   echo ">>> The modules are located at:"
137   echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
138   echo ">>> For more information about ACPI modules check this wiki page:"
139   echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
143 post_remove() {
144   rm -f /boot/kernel26${KERNEL_NAME}.img
145   rm -f /boot/kernel26${KERNEL_NAME}-fallback.img