Share Pastebin
Guest
Public paste!

dieghen89

By: a guest | Feb 7th, 2010 | Syntax: Bash | Size: 1.67 KB | Hits: 164 | Expires: Never
Copy text to clipboard
  1. KERNEL_VERSION=2.6.32.7-netbook
  2.  
  3. pre_install() {
  4. cpu=cat /proc/cpuinfo | grep Atom | tail -n1 | awk '{print $5}'
  5. if  [ $cpu != "Atom(TM)" ] ; then
  6.         echo ">>"
  7.         echo ">> Your netbook haven't a Intel Atom processor"
  8.         echo ">> Model not supported!"
  9.         echo ">>"
  10.         echo ">> If there is an error, please report the problem on the AUR page:"
  11.         echo ">> ????"
  12.         echo ">>"
  13.         return 1       
  14. fi
  15. }
  16.  
  17. post_install() {
  18. #if the netbook is an eeepc 901 (atom with ssd) add this file
  19.   if [ $(dmidecode -s system-product-name | sed 's/[ \t]*$//') = 901 ] ; then
  20.         echo '# ensure our SSD drive is set up as non-rotational
  21. ACTION=="add" SUBSYSTEM=="block", SUBSYSTEMS=="pci", ATTRS{subsystem_vendor}=="0x1043", ATTRS{subsystem_device}=="0x82d8", ATTR{queue/rotational}="0"
  22. ACTION=="add" SUBSYSTEM=="block", SUBSYSTEMS=="pci", ATTRS{subsystem_vendor}=="0x1043", ATTRS{subsystem_device}=="0x830f", ATTR{queue/rotational}="0"' > /etc/udev/rules.d/61-eee-ssd.rules
  23.   fi
  24.  
  25.   echo -e ""
  26.   echo -e "$_B >$_W Updating module dependencies$_n"
  27.   depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
  28.   echo -e ""
  29.   echo -e ">> Home page of the project:"
  30.   echo -e ">> http://thedarkcornerofmymind.comxa.com/kernel-netbook"
  31.   echo -e ">>"
  32.   echo -e ">> Arch Forum's page:"
  33.   echo -e ">> http://www.archlinux.it/forum/viewtopic.php?pid=58810"
  34. }
  35.  
  36. post_upgrade() {
  37.   echo -e ""
  38.   echo -e "$_B >$_W Updating module dependencies$_n"
  39.   depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
  40.   echo -e ""
  41.   echo -e ">> Home page of the project:"
  42.   echo -e ">> http://thedarkcornerofmymind.comxa.com/kernel-netbook"
  43.   echo -e ">>"
  44.   echo -e ">> Arch Forum's page:"
  45.   echo -e ">> http://www.archlinux.it/forum/viewtopic.php?pid=58810"
  46. }