summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-lts-xen/linux-libre-lts-xen.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <andre@pc-01.localdomain>2012-04-24 19:30:52 -0300
committerAndré Fabian Silva Delgado <andre@pc-01.localdomain>2012-04-24 19:30:52 -0300
commit02714e4cfaa5d778b4506f14e18ad198e99b7401 (patch)
tree466fbec610b329206bc0520ae51f9c8fafe2aae5 /kernels/linux-libre-lts-xen/linux-libre-lts-xen.install
parentd34c6edfac2f4af94f37d978bf41a85d2c92df1b (diff)
downloadabslibre-02714e4cfaa5d778b4506f14e18ad198e99b7401.tar.gz
abslibre-02714e4cfaa5d778b4506f14e18ad198e99b7401.tar.bz2
abslibre-02714e4cfaa5d778b4506f14e18ad198e99b7401.zip
linux-libre-lts-xen-3.0.28-1: new kernel for Parabola
Diffstat (limited to 'kernels/linux-libre-lts-xen/linux-libre-lts-xen.install')
-rw-r--r--kernels/linux-libre-lts-xen/linux-libre-lts-xen.install62
1 files changed, 62 insertions, 0 deletions
diff --git a/kernels/linux-libre-lts-xen/linux-libre-lts-xen.install b/kernels/linux-libre-lts-xen/linux-libre-lts-xen.install
new file mode 100644
index 000000000..8510e226d
--- /dev/null
+++ b/kernels/linux-libre-lts-xen/linux-libre-lts-xen.install
@@ -0,0 +1,62 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+KERNEL_NAME=-lts-xen
+KERNEL_VERSION=3.0.28-1-LIBRE-LTS-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}" = "-xen" ]; 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 findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
+ echo "WARNING: /boot appears to be a separate partition but is not mounted."
+ 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
+}