diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-09-07 12:29:46 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-09-07 12:29:46 -0300 |
commit | fba1f9077f6d545ad97b66b10b62ff44425a3c68 (patch) | |
tree | be05c977bb3fb4b75cfcce0e13493625adbe17f1 /kernels/linux-libre-xen/linux-libre-xen.install | |
parent | 730bda0e79d3e122d665663a18e0c973d7209236 (diff) | |
parent | 3a9ddbf363ba691ca209ad36485390d14ba3b46f (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
libre/abs-libre/PKGBUILD
libre/icecat/PKGBUILD
libre/libretools/PKGBUILD
libre/linux-libre/PKGBUILD
libre/mplayer-libre/PKGBUILD
libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
libre/pacman/PKGBUILD
libre/python2-libre/PKGBUILD
Diffstat (limited to 'kernels/linux-libre-xen/linux-libre-xen.install')
-rw-r--r-- | kernels/linux-libre-xen/linux-libre-xen.install | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/kernels/linux-libre-xen/linux-libre-xen.install b/kernels/linux-libre-xen/linux-libre-xen.install new file mode 100644 index 000000000..5ab58fd0d --- /dev/null +++ b/kernels/linux-libre-xen/linux-libre-xen.install @@ -0,0 +1,65 @@ +# arg 1: the new package version +# arg 2: the old package version + +KERNEL_NAME=-xen +KERNEL_VERSION=3.0-LIBRE-XEN + +post_install () { + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + + # compat symlinks for the official kernels only + if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then + loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)" + [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf" + if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then + # add compat symlinks for the initramfs images + ln -sf initramfs-linux-libre${KERNEL_NAME}.img /boot/kernel26${KERNEL_NAME}.img + ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img /boot/kernel26${KERNEL_NAME}-fallback.img + ln -sf vmlinuz-linux-libre${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME} + fi + fi +} + +post_upgrade() { + pacman -Q grub &>/dev/null + hasgrub=$? + pacman -Q grub2 &>/dev/null + hasgrub2=$? + pacman -Q lilo &>/dev/null + haslilo=$? + # reminder notices + if [ $haslilo -eq 0 ]; then + echo ">>>" + if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then + echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting." + else + echo ">>> You appear to be using the LILO bootloader. You should run" + echo ">>> 'lilo' before rebooting." + fi + echo ">>>" + fi + + if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then + if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then + echo "WARNING: /boot appears to be a seperate partition but is not mounted" + echo " This is most likely not what you want. Please mount your /boot" + echo " partition and reinstall the kernel unless you are sure this is OK" + fi + fi + + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} +} + +post_remove() { + # also remove the compat symlinks + rm -f boot/{initramfs-linux-libre,kernel26}${KERNEL_NAME}.img + rm -f boot/{initramfs-linux-libre,kernel26}${KERNEL_NAME}-fallback.img +} |