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