Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Fan-Control-Daemon
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
Fan-Control-Daemon
Commits
03ac2050
Commit
03ac2050
authored
Aug 23, 2012
by
Daniel Graziotin
Browse files
Options
Browse Files
Download
Plain Diff
Added Gentoo support and enhanced README.md
parents
37847f39
a895bff9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
113 additions
and
39 deletions
+113
-39
AUTHORS
AUTHORS
+5
-4
Makefile
Makefile
+1
-1
README.md
README.md
+79
-24
mbpfan.init.gentoo
mbpfan.init.gentoo
+18
-0
minunit.c
src/minunit.c
+0
-10
minunit.h
src/minunit.h
+10
-0
No files found.
AUTHORS
View file @
03ac2050
MAINTAINERS AND CONTRIBUTO
RS
AUTHORS, CONTRIBUTORS, MAINTAINE
RS
----------------------------
----------------------------
------
Daniel Graziotin <dgraziotin AT task3 DOT cc>
Daniel Graziotin <dgraziotin AT task3 DOT cc>
Ismail Khatib <ikhatib AT gmail DOT com>
Ismail Khatib <ikhatib AT gmail DOT com>
Trevor Joynson
Trevor Joynson
Magnus Stubman <magnus AT stubman DOT eu>
ORIGINARY AUTHORS
ORIGINARY AUTHORS
-----------------
-----------------
Allan McRae mbpfan <http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon>
Allan McRae mbpfan <http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon>
rvega <https://github.com/rvega/Fan-Control-Daemon>
rvega <https://github.com/rvega/Fan-Control-Daemon>
Makefile
View file @
03ac2050
README.md
View file @
03ac2050
...
@@ -17,18 +17,48 @@ This enhanced version assumes any number of processors and fans (max. 10).
...
@@ -17,18 +17,48 @@ This enhanced version assumes any number of processors and fans (max. 10).
*
Users can configure it using the file /etc/mbpfan.conf
*
Users can configure it using the file /etc/mbpfan.conf
Supported GNU/Linux Distributions
---------------------------------
We provide scripts to to load mbpfan daemon at system boot for many distros.
Please note that the support is provided by volunteers. mbpfan needs test and bug reports.
Supported distributions:
-
Ubuntu
-
Debian
-
Fedora
-
RedHat
-
CentOS
-
Gentoo
Tested Macbook Models
---------------------
-
MacBook Pro 8.1 13" (Intel i7 - Linux 3.2)
-
MacBook Pro 6,2 15" (Intel i7 - Linux 3.2)
-
MacBook Pro 2,2 15" (Intel Core 2 Duo - Linux 3.4.4)
Warning
-------
Be sure to load the kernel modules
**applesmc**
and
**coretemp**
.
Compile Instructions
Compile Instructions
---------------------
---------------------
Compile with
Compile with
make
make
Manually compile with
Manually compile with
gcc -o bin/mbpfan src/mbpfan.c -lm
gcc -o bin/mbpfan src/mbpfan.c -lm
Install Instructions
Install Instructions
--------------------
--------------------
Install with
Install with
sudo make install
sudo make install
It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
...
@@ -37,21 +67,27 @@ It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
...
@@ -37,21 +67,27 @@ It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
Run The Tests (Recommended)
Run The Tests (Recommended)
---------------------------
---------------------------
It is recommended to run the tests after installing the program
It is recommended to run the tests after installing the program
sudo ./bin/mbpfan -t
sudo ./bin/mbpfan -t
or
or
sudo make tests
sudo make tests
Run Instructions
Run Instructions
----------------
----------------
If not installed, run with
If not installed, run with
sudo bin/mbpfan
sudo bin/mbpfan
If installed, manually run with
If installed, manually run with
sudo mbpfan
sudo mbpfan
If installed and using the init file, run with (Ubuntu example)
If installed and using the init file, run with (Ubuntu example)
sudo service mbpfan start
sudo service mbpfan start
Starting at boot
Starting at boot
...
@@ -60,6 +96,7 @@ Starting at boot
...
@@ -60,6 +96,7 @@ Starting at boot
For upstart based init systems (Ubuntu), an example upstart job has been
For upstart based init systems (Ubuntu), an example upstart job has been
provided for use in place of the LSB-style init script.
provided for use in place of the LSB-style init script.
To use, execute:
To use, execute:
sudo cp mbpfan.upstart /etc/init/mbpfan.conf
sudo cp mbpfan.upstart /etc/init/mbpfan.conf
sudo start mbpfan
sudo start mbpfan
...
@@ -68,7 +105,9 @@ An init file suitable for /lib/lsb/init-functions (Debian)
...
@@ -68,7 +105,9 @@ An init file suitable for /lib/lsb/init-functions (Debian)
is located in the main folder of the source files, called mbpfan.init.debian
is located in the main folder of the source files, called mbpfan.init.debian
Rename it to mbpfan, give it execution permissions (chmod +x mbpfan)
Rename it to mbpfan, give it execution permissions (chmod +x mbpfan)
and move it to /etc/init.d
and move it to /etc/init.d
Then, add it to the default runlevels with sudo update-rc.d mbpfan defaults
Then, add it to the default runlevels with (as root):
sudo update-rc.d mbpfan defaults
**Redhat, CentOS, Fedora**
**Redhat, CentOS, Fedora**
An init file suitable for /etc/rc.d/init.d/functions
An init file suitable for /etc/rc.d/init.d/functions
...
@@ -76,27 +115,43 @@ An init file suitable for /etc/rc.d/init.d/functions
...
@@ -76,27 +115,43 @@ An init file suitable for /etc/rc.d/init.d/functions
mbpfan.init.redhat. Also rename it to mbpfan, give it execution permissions
mbpfan.init.redhat. Also rename it to mbpfan, give it execution permissions
and move it to /etc/init.d
and move it to /etc/init.d
To add the script to the default runlevels, run the following as root:
To add the script to the default runlevels, run the following as root:
chkconfig --level 2345 mbpfan on && chkconfig --level 016 mbpfan off
chkconfig --level 2345 mbpfan on && chkconfig --level 016 mbpfan off
**Gentoo**
An init file is available for gentoo users: mbpfan.init.gentoo
To install, run as root:
cp mbpfan.init.gentoo /etc/init.d/mbpfan
To automatically run mbpfan at boot, run as root:
rc-update add mbpfan default
**systemd**
**systemd**
As a special bonus, a service file for systemd is also included. To use it,
As a special bonus, a service file for systemd is also included. To use it,
execute the following as root:
execute the following (as root):
sudo cp mbpfan.service /usr/lib/systemd/system
sudo ln -s /usr/lib/systemd/system/mbpfan.service /etc/systemd/system/mbpfan.service
sudo cp mbpfan.service /usr/lib/systemd/system
sudo systemctl daemon-reload
sudo ln -s /usr/lib/systemd/system/mbpfan.service /etc/systemd/system/mbpfan.service
sudo systemctl start mbpfan.service
sudo systemctl daemon-reload
sudo systemctl start mbpfan.service
To start the service automatically at boot, also execute the following:
To start the service automatically at boot, also execute the following:
sudo systemctl enable mbpfan.service
sudo systemctl enable mbpfan.service
Usage
Usage
-------
-------
Usage: ./mbpfan OPTION(S)
-h Show the help screen
Usage: ./mbpfan OPTION(S)
-f Run in foreground
-t Run the tests
-h Show the help screen
-v Be (a lot) verbose
-f Run in foreground
-t Run the tests
-v Be (a lot) verbose
License
License
...
...
mbpfan.init.gentoo
0 → 100755
View file @
03ac2050
#!/sbin/runscript
depend() {
use logger
}
start() {
ebegin "Starting mbpfan"
start-stop-daemon --start --quiet --exec /usr/sbin/mbpfan
eend $?
}
stop() {
ebegin "Stopping mbpfan"
start-stop-daemon --stop --quiet --exec /usr/sbin/mbpfan
eend $?
}
src/minunit.c
View file @
03ac2050
...
@@ -10,16 +10,6 @@
...
@@ -10,16 +10,6 @@
int
tests_run
=
0
;
int
tests_run
=
0
;
struct
s_sensors
{
char
*
path
;
char
*
fan_output_path
;
char
*
fan_manual_path
;
unsigned
int
temperature
;
struct
s_sensors
*
next
;
};
typedef
s_sensors
t_sensors
;
static
char
*
test_sensor_paths
()
static
char
*
test_sensor_paths
()
{
{
t_sensors
*
sensors
=
retrieve_sensors
();
t_sensors
*
sensors
=
retrieve_sensors
();
...
...
src/minunit.h
View file @
03ac2050
...
@@ -5,6 +5,16 @@
...
@@ -5,6 +5,16 @@
#define mu_run_test(test) do { char *message = test(); tests_run++; \
#define mu_run_test(test) do { char *message = test(); tests_run++; \
if (message) return message; } while (0)
if (message) return message; } while (0)
struct
s_sensors
{
char
*
path
;
char
*
fan_output_path
;
char
*
fan_manual_path
;
unsigned
int
temperature
;
struct
s_sensors
*
next
;
};
typedef
s_sensors
t_sensors
;
extern
int
tests_run
;
extern
int
tests_run
;
static
char
*
test_sensor_paths
();
static
char
*
test_sensor_paths
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment