updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / unifiedkernel / kernel26.install
blob741df21318af32a53c4e113c3145157c0ae6950e
1 post_install ()
3         pkgname=unifiedkernel
4         kernelname=vmlinuz-2.6.30-uk-0.2.4.1
5         default_img=unifiedkernel.img
6         fallback_img=unifiedkernel-fallback.img
7         preset_file=unifiedkernel.preset
9         echo ">"
10         echo "> Updating module dependencies. Please wait ..."
11         echo "> 更新模块依赖关系,请稍候 ..."
13         kernel_version=$(pacman -Ql $pkgname | grep "lib/modules/.*/modules.order" | cut -d "/" -f4)
14         depmod -a ${kernel_version}
16         echo ">"
17         echo "> Generating boot initramfs, Please wait..."
18         echo "> 创建启动内核镜像,请稍候..."
19         echo ">"
21         /sbin/mkinitcpio -p ${kver_file%%.preset}
23         rootdevice=$(cat /proc/cmdline | tr " " "\n" | grep "root" | cut -d "=" -f2)
24         bootindex=${rootdevice#/dev/[s|h]d[a-z]}
25         let bootindex-=1
27         echo "> Generating boot initramfs finished: "
28         echo "> The kernel name is "${kernelname}" "
29         echo "> The boot initramfs is "${default_img}" and "${fallback_img}" "
30         echo "> Pls. add the corresponding boot options to your boot configuration file."
31         echo "> Below lines need to be added to GRUB's menu.lst for reference: "
32         echo "> 启动内核镜像创建完成:"
33         echo "> 内核: "${kernelname}" "
34         echo "> 启动内核镜像: "${default_img}" 和 "${fallback_img}" "
35         echo "> 请将相应启动选项加入到启动配置文件,以下是GRUB的menu.lst相关设置仅供参考:"
36         echo ""
37         echo "title Arch Linux $pkgname ${rootdevice} (initrd=/boot/${default_img}) "
38         echo "root (hd0,${bootindex}) "
39         echo "kernel /boot/${kernelname} root=${rootdevice} ro"
40         echo "initrd /boot/${default_img}"
41         echo " "
42         echo "title Arch Linux Failsafe $pkgname ${rootdevice} (initrd=/boot/${fallback_img}) "
43         echo "root (hd0,${bootindex}) "
44         echo "kernel /boot/${kernelname} root=${rootdevice} ro nomodeset acpi=off noapic pci=bios"
45         echo "initrd /boot/${fallback_img}"
46         echo " "
49 post_upgrade()
51         post_install