This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

linux-ck-3.1.1-1.install

By: sealemar on Nov 19th, 2011  |  syntax: Bash  |  size: 2.52 KB  |  views: 68  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. _no_ramdisk=y
  2.  
  3. KERNEL_NAME=-ck
  4. KERNEL_VERSION=3.1.1-1-ck
  5.  
  6. post_install () {
  7.     # updating module dependencies
  8.     echo ">>> Updating module dependencies. Please wait ..."
  9.     depmod ${KERNEL_VERSION}
  10.  
  11.     if [ "${_no_ramdisk}" != "y" ] ; then
  12.         echo ">>> Generating initial ramdisk, using mkinitcpio.  Please wait..."
  13.         mkinitcpio -p linux${KERNEL_NAME}
  14.     fi
  15.  
  16.     # compat symlinks for the official kernels only
  17.     if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then
  18.         loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)"
  19.         [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf"
  20.         if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then
  21.             # add compat symlinks for the initramfs images
  22.             ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
  23.             ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
  24.                 boot/kernel26${KERNEL_NAME}-fallback.img
  25.             ln -sf vmlinuz-linux${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME}
  26.         fi
  27.     fi
  28. }
  29.  
  30. post_upgrade() {
  31.     pacman -Q grub &>/dev/null
  32.     hasgrub=$?
  33.     pacman -Q grub2 &>/dev/null
  34.     hasgrub2=$?
  35.     pacman -Q lilo &>/dev/null
  36.     haslilo=$?
  37.     # reminder notices
  38.     if [ $haslilo -eq 0 ]; then
  39.         echo ">>>"
  40.         if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
  41.             echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
  42.         else
  43.             echo ">>> You appear to be using the LILO bootloader. You should run"
  44.             echo ">>> 'lilo' before rebooting."
  45.         fi
  46.         echo ">>>"
  47.     fi
  48.  
  49.     if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
  50.         if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
  51.             echo "WARNING: /boot appears to be a seperate partition but is not mounted."
  52.             echo " You probably just broke your system. Congratulations."  
  53.         fi
  54.     fi
  55.  
  56.     # updating module dependencies
  57.     echo ">>> Updating module dependencies. Please wait ..."
  58.     depmod ${KERNEL_VERSION}
  59.  
  60.     if [ "${_no_ramdisk}" != "y" ] ; then
  61.         echo ">>> Generating initial ramdisk, using mkinitcpio.  Please wait..."
  62.         mkinitcpio -p linux${KERNEL_NAME}
  63.     fi
  64. }
  65.  
  66. post_remove() {
  67.     # also remove the compat symlinks
  68.     rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
  69.     rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img
  70. }
  71.  
clone this paste RAW Paste Data