Skip to content

Commit 8db63a4

Browse files
coduttigaul
authored andcommitted
Removed autoconfig with suggested procedure because has been integrated on mbpfan. Commented auto detect values from config file.
1 parent 87f3fc2 commit 8db63a4

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

mbpfan.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
# see https://ineed.coffee/3838/a-beginners-tutorial-for-mbpfan-under-ubuntu for the values
3-
min_fan_speed = 2000 # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
4-
max_fan_speed = 6200 # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"
3+
#min_fan_speed = 2000 # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
4+
#max_fan_speed = 6200 # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"
55
low_temp = 63 # try ranges 55-63, default is 63
66
high_temp = 66 # try ranges 58-66, default is 66
77
max_temp = 86 # take highest number returned by "cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max", divide by 1000

mbpfan.spec

+8-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ URL: https://github.com/dgraziotin/mbpfan
33
License: GPLv3
44
Group: System Environment/Daemons
55
Version: %{SOURCE_VERSION}
6-
Release: 1
6+
Release: 3
77
Summary: A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux 3.x.x and 4.x.x
88
Source: v%{version}.tar.gz
99

@@ -35,16 +35,10 @@ rm -rf $RPM_BUILD_ROOT
3535

3636
%post
3737
%systemd_post mbpfan.service
38-
# If it is a first installation then autoconfigure daemon
39-
if [[ ${1} == 1 ]]; then
40-
min_fan_speed="$(cat /sys/devices/platform/applesmc.768/fan*_min| uniq| sort |head -1)"
41-
max_fan_speed="$(cat /sys/devices/platform/applesmc.768/fan*_max| uniq| sort |tail -1)"
42-
let max_temp=$(cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max|uniq |sort |tail -1)/1000
43-
sed -i "s/min_fan_speed = [^\t]\+/min_fan_speed = $min_fan_speed/g" /etc/mbpfan.conf
44-
sed -i "s/max_fan_speed = [^\t]\+/max_fan_speed = $max_fan_speed/g" /etc/mbpfan.conf
45-
sed -i "s/max_temp = [^\t]\+/max_temp = $max_temp/g" /etc/mbpfan.conf
46-
fi
47-
echo "Attention: mbpfan preconfigured with sane values, to run it type:"
38+
echo "mbpfan will auto detect sane values for min and max fan speeds."
39+
echo "If you want to customize these values please edit:"
40+
echo "/etc/mbpfan.conf"
41+
echo "To start the daemon now type:"
4842
echo "systemctl start mbpfan"
4943
echo "To run also at boot, type:"
5044
echo "systemctl enable mbpfan"
@@ -63,6 +57,9 @@ echo "systemctl enable mbpfan"
6357
/usr/lib/systemd/system/mbpfan.service
6458

6559
%changelog
60+
* Mon Sep 10 2018 Michele Codutti <[email protected]> - 2.0.2-3
61+
- Removed autoconfig with suggested procedure because has been integrated on mbpfan.
62+
6663
* Sun Aug 19 2018 Michele Codutti <[email protected]> - 2.0.2-2
6764
- Autoconfig with suggested procedure.
6865
- Initial packaging

0 commit comments

Comments
 (0)