updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / phc-k8 / phc-k8.install
blob2ced526faac81b47aefae08229ff1f0745566fb3
1 post_install()
3         cat << EOF
4 Run "/etc/rc.d/phc-k8 setup" to build the module for current kernel.
5 You can enter the desired voltage IDs in /etc/conf.d/phc-k8.
6 Booting with nophc kernel parameter skips setting of VIDs in case of failure.
7 EOF
10 post_upgrade() {
11         if [ "$(vercmp $2 0.4.3-2)" -lt 0 ]; then
12                 post_install
13                 depmod
14         fi
17 post_remove()
19         echo Removing built modules ...
20         rm -rf usr/src/phc-k8/
21         rm -f var/log/phc-k8.log
22         cd lib/modules/
23         for i in *; do
24                 if [ -f "$i/extramodules/phc-k8.ko" ]; then
25                         rm -f "$i"/extramodules/{mperf,phc-k8}.ko
26                         [ -d "$i/kernel" ] && depmod "$i"
27                 elif [ -f "$i/phc-k8.ko" ]; then
28                         rm -f "$i"/{mperf,phc-k8}.ko
29                         rmdir -p --ignore-fail-on-non-empty "$i"
30                 elif [ -e "$i/updates/kernel/arch/x86/kernel/cpu/cpufreq/phc-k8.ko" ]; then
31                         rm -f "$i"/updates/kernel/arch/x86/kernel/cpu/cpufreq/{mperf,phc-k8}.ko
32                         rmdir -p --ignore-fail-on-non-empty "$i/updates/kernel/arch/x86/kernel/cpu/cpufreq"
33                         [ -d "$i/kernel" ] && depmod "$i"
34                 fi
35         done