summaryrefslogtreecommitdiff
path: root/pcr/phc-intel/phc-intel.install
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-04-06 19:45:37 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-04-12 01:03:19 -0400
commit8144b256315765a54169b04c16ffd47c6f4213a2 (patch)
tree9ac8aeaedc5c6f5e2bf444b22ad0ae766facd9ce /pcr/phc-intel/phc-intel.install
parentf66887ec1352fc77e21efdeef796fd6825dc90e3 (diff)
downloadabslibre-8144b256315765a54169b04c16ffd47c6f4213a2.tar.gz
abslibre-8144b256315765a54169b04c16ffd47c6f4213a2.tar.bz2
abslibre-8144b256315765a54169b04c16ffd47c6f4213a2.zip
[phc-intel]: add package
Diffstat (limited to 'pcr/phc-intel/phc-intel.install')
-rw-r--r--pcr/phc-intel/phc-intel.install32
1 files changed, 32 insertions, 0 deletions
diff --git a/pcr/phc-intel/phc-intel.install b/pcr/phc-intel/phc-intel.install
new file mode 100644
index 000000000..fb69a8b4a
--- /dev/null
+++ b/pcr/phc-intel/phc-intel.install
@@ -0,0 +1,32 @@
+post_install() {
+ cat <<-EOF
+ You can enter the desired voltage IDs in /etc/default/phc-intel.
+ Booting with nophc kernel parameter skips setting of VIDs in case of failure.
+ EOF
+}
+
+pre_upgrade() {
+ if (( "$(vercmp $2 0.3.2.12.19-2)" < 0 )); then
+ cd usr/lib/modules/
+ for i in *; do
+ if [ -f "$i/extramodules/phc-intel.ko" ]; then
+ rm -f "$i/extramodules/phc-intel.ko"
+ [ -d "$i/kernel" ] && depmod "$i"
+ elif [ -f "$i/phc-intel.ko" ]; then
+ rm -f "$i/phc-intel.ko"
+ rmdir -p --ignore-fail-on-non-empty "$i"
+ elif [ -f "$i/extra/phc-intel.ko" ]; then
+ rm -f "$i/extra/phc-intel.ko"
+ rmdir -p --ignore-fail-on-non-empty "$i/extra"
+ [ -d "$i/kernel" ] && depmod "$i"
+ fi
+ done
+ fi
+}
+
+post_upgrade() {
+ if (( "$(vercmp $2 0.3.2.12.19-2)" < 0 )); then
+ rm -rf usr/src/phc-intel/
+ echo '===> The kernel module gets automatically built by DKMS now.'
+ fi
+}