dieghen89
By: a guest | Feb 7th, 2010 | Syntax:
Bash | Size: 1.67 KB | Hits: 164 | Expires: Never
KERNEL_VERSION=2.6.32.7-netbook
pre_install() {
cpu=cat /proc/cpuinfo | grep Atom | tail -n1 | awk '{print $5}'
if [ $cpu != "Atom(TM)" ] ; then
echo ">>"
echo ">> Your netbook haven't a Intel Atom processor"
echo ">> Model not supported!"
echo ">>"
echo ">> If there is an error, please report the problem on the AUR page:"
echo ">> ????"
echo ">>"
return 1
fi
}
post_install() {
#if the netbook is an eeepc 901 (atom with ssd) add this file
if [ $(dmidecode -s system-product-name | sed 's/[ \t]*$//') = 901 ] ; then
echo '# ensure our SSD drive is set up as non-rotational
ACTION=="add" SUBSYSTEM=="block", SUBSYSTEMS=="pci", ATTRS{subsystem_vendor}=="0x1043", ATTRS{subsystem_device}=="0x82d8", ATTR{queue/rotational}="0"
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
fi
echo -e ""
echo -e "$_B >$_W Updating module dependencies$_n"
depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
echo -e ""
echo -e ">> Home page of the project:"
echo -e ">> http://thedarkcornerofmymind.comxa.com/kernel-netbook"
echo -e ">>"
echo -e ">> Arch Forum's page:"
echo -e ">> http://www.archlinux.it/forum/viewtopic.php?pid=58810"
}
post_upgrade() {
echo -e ""
echo -e "$_B >$_W Updating module dependencies$_n"
depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
echo -e ""
echo -e ">> Home page of the project:"
echo -e ">> http://thedarkcornerofmymind.comxa.com/kernel-netbook"
echo -e ">>"
echo -e ">> Arch Forum's page:"
echo -e ">> http://www.archlinux.it/forum/viewtopic.php?pid=58810"
}