G2A Many GEOs
SHARE
TWEET

linux-ck-3.1.1-1.install

sealemar Nov 19th, 2011 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top