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
8ed60e90
Commit
8ed60e90
authored
Aug 22, 2012
by
Daniel Graziotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #14 and enhances Readme.md
parent
fcf18f52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
14 deletions
+24
-14
Makefile
Makefile
+4
-0
README.md
README.md
+18
-12
mbpfan.c
src/mbpfan.c
+2
-2
No files found.
Makefile
View file @
8ed60e90
...
...
@@ -58,6 +58,10 @@ tests:
make
install
sudo
/usr/sbin/mbpfan
-f
-v
-t
uninstall
:
rm
/usr/sbin/mbpfan
rm
/etc/mbpfan.conf
install
:
make
cp
$(EXE)
/usr/sbin
...
...
README.md
View file @
8ed60e90
...
...
@@ -56,32 +56,38 @@ sudo service mbpfan start
Starting at boot
----------------
An init file suitable for /lib/lsb/init-functions (Debian & Ubuntu for sure)
**Ubuntu**
For upstart based init systems (Ubuntu), an example upstart job has been
provided for use in place of the LSB-style init script.
To use, execute:
sudo cp mbpfan.upstart /etc/init/mbpfan.conf
sudo start mbpfan
**Debian**
An init file suitable for /lib/lsb/init-functions (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)
and move it to /etc/init.d
Then, add it to the default runlevels with sudo update-rc.d mbpfan defaults
Additionally, an init file suitable for /etc/rc.d/init.d/functions
**Redhat, CentOS, Fedora**
An init file suitable for /etc/rc.d/init.d/functions
(RHEL/CentOS & Fedora) is also located at the same place, this file is called
mbpfan.init.redhat. Also rename it to mbpfan, give it execution permissions
and move it to /etc/init.d
To add the script to the default runlevels, run the following as root:
chkconfig --level 2345 mbpfan on && chkconfig --level 016 mbpfan off
For upstart based init systems (Ubuntu), an example upstart job has been
provided for use in place of the LSB-style init script. To use, execute
as root:
cp mbpfan.upstart /etc/init/mbpfan.conf
start mbpfan
**systemd**
As a special bonus, a service file for systemd is also included. To use it,
execute the following as root:
cp mbpfan.service /usr/lib/systemd/system
ln -s /usr/lib/systemd/system/mbpfan.service /etc/systemd/system/mbpfan.service
systemctl daemon-reload
systemctl start mbpfan.service
sudo cp mbpfan.service /usr/lib/systemd/system
sudo ln -s /usr/lib/systemd/system/mbpfan.service /etc/systemd/system/mbpfan.service
sudo systemctl daemon-reload
sudo systemctl start mbpfan.service
To start the service automatically at boot, also execute the following:
systemctl enable mbpfan.service
s
udo s
ystemctl enable mbpfan.service
Usage
...
...
src/mbpfan.c
View file @
8ed60e90
...
...
@@ -78,7 +78,7 @@ t_sensors *retrieve_sensors()
const
char
*
path_end
=
"_input"
;
int
path_size
=
strlen
(
path_begin
)
+
strlen
(
path_end
)
+
2
;
char
number
[
1
];
char
number
[
2
];
sprintf
(
number
,
"%d"
,
0
);
int
i
=
0
;
...
...
@@ -132,7 +132,7 @@ void find_fans(t_sensors* sensors)
int
path_min_size
=
strlen
(
path_begin
)
+
strlen
(
path_output_end
)
+
2
;
int
path_man_size
=
strlen
(
path_begin
)
+
strlen
(
path_man_end
)
+
2
;
char
number
[
1
];
char
number
[
2
];
sprintf
(
number
,
"%d"
,
0
);
int
n_sensors
=
0
;
...
...
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