diff options
author | Thomas Orgis | 2016-01-05 21:35:27 +0100 |
---|---|---|
committer | Thomas Orgis | 2016-01-05 21:35:27 +0100 |
commit | af00e8277c6dad42c53dd02cf766905d42e10f62 (patch) | |
tree | 0bc09928bfec98110077cc124ab10a69155a753c | |
parent | 485fc74ef7df0b6358d634f1de88871d18675faf (diff) |
thinkfan: new spell, userspace fan control daemon
(mainly for Thinkpads, but also of generic use)
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | mobile/thinkfan/BUILD | 1 | ||||
-rwxr-xr-x | mobile/thinkfan/DEPENDS | 5 | ||||
-rwxr-xr-x | mobile/thinkfan/DETAILS | 25 | ||||
-rwxr-xr-x | mobile/thinkfan/FINAL | 6 | ||||
-rw-r--r-- | mobile/thinkfan/HISTORY | 3 | ||||
-rwxr-xr-x | mobile/thinkfan/PRE_BUILD | 3 | ||||
-rw-r--r-- | mobile/thinkfan/init.d/thinkfan | 43 |
8 files changed, 90 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2016-01-05 Thomas Orgis <sobukus@sourcemage.org> + * mobile/thinkfan: userpsace fan cooling control daemon + for Thinkpads or generic sysfs sensor access + 2016-01-04 Pavel Vinogradov <public@sourcemage.org> * chat-im/skypeweb: new spell, SkypeWeb Plugin for Pidgin/libpurple/Adium diff --git a/mobile/thinkfan/BUILD b/mobile/thinkfan/BUILD new file mode 100755 index 0000000000..eebdeb0c1a --- /dev/null +++ b/mobile/thinkfan/BUILD @@ -0,0 +1 @@ +OPTS="$OPTS -Wno-dev" cmake_build diff --git a/mobile/thinkfan/DEPENDS b/mobile/thinkfan/DEPENDS new file mode 100755 index 0000000000..a5e7356a4d --- /dev/null +++ b/mobile/thinkfan/DEPENDS @@ -0,0 +1,5 @@ +depends cmake && +optional_depends libatasmart \ + "-DUSE_ATASMART=ON" \ + "-DUSE_ATASMART=OFF" \ + "read hard disk temperatures via SMART" diff --git a/mobile/thinkfan/DETAILS b/mobile/thinkfan/DETAILS new file mode 100755 index 0000000000..74b8cb4125 --- /dev/null +++ b/mobile/thinkfan/DETAILS @@ -0,0 +1,25 @@ + SPELL=thinkfan + VERSION=0.9.2 + SOURCE="$SPELL-$VERSION.tar.gz" + SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/$SPELL/$SOURCE + SOURCE_HASH=sha512:b27fd60a02ad06d30485ae3d658af6b9e79af3c898f415d0ff613839424f5dc9731be03d1d9bf3ed1311ecd0778aef5b30fa908cab386cf419db77ae29940684 +SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION" + WEB_SITE="http://sourceforge.net/projects/thinkfan/" + LICENSE[0]=GPL + ENTERED=20160105 + SHORT="A simple fan control program." +cat << EOF +A simple fan control program. Read temperatures, check them against configured +limits and switch to appropriate (also pre-configured) fan level. Requires +a working thinkpad_acpi or any other hwmon driver that enables temperature +reading and fan control from userspace. + +Features: + +- per-sensor temperature limits - arbitrary strings as fan level (supports +"disengaged" + and "auto" modes on thinkpads) +- some sanity checks (cough) - DANGEROUS mode which allows you to destroy +your hardware - ability to destroy your hardware even without dangerous + mode if you try hard enough +EOF diff --git a/mobile/thinkfan/FINAL b/mobile/thinkfan/FINAL new file mode 100755 index 0000000000..c78bd3cc3c --- /dev/null +++ b/mobile/thinkfan/FINAL @@ -0,0 +1,6 @@ +message \ +"${PROBLEM_COLOR}Before starting the init script, ensure to have a config file matching +your hardware in $INSTALL_ROOT/etc/thinkfan.conf, See examples in +$INSTALL_ROOT/usr/share/doc/thinkfan/. You should carefully tune/check the +settings to avoid damaging your hardware because of insufficient cooling.$DEFAULT_COLOR" + diff --git a/mobile/thinkfan/HISTORY b/mobile/thinkfan/HISTORY new file mode 100644 index 0000000000..5a1a124d28 --- /dev/null +++ b/mobile/thinkfan/HISTORY @@ -0,0 +1,3 @@ +2016-01-05 Thomas Orgis <sobukus@sourcemage.org> + * BUILD, DEPENDS, DETAILS, PRE_BUILD, FINAL, init.d/thinkfan: created + diff --git a/mobile/thinkfan/PRE_BUILD b/mobile/thinkfan/PRE_BUILD new file mode 100755 index 0000000000..284653e5b0 --- /dev/null +++ b/mobile/thinkfan/PRE_BUILD @@ -0,0 +1,3 @@ +mkdir -p "$SOURCE_DIRECTORY" && +cd "$SOURCE_DIRECTORY" && +unpack_file diff --git a/mobile/thinkfan/init.d/thinkfan b/mobile/thinkfan/init.d/thinkfan new file mode 100644 index 0000000000..7e92c86736 --- /dev/null +++ b/mobile/thinkfan/init.d/thinkfan @@ -0,0 +1,43 @@ +#!/bin/bash + +PROGRAM=/usr/sbin/thinkfan +DESC="Fan cooling control daemon" +ARGS=-q +RUNLEVEL=3 + +. /etc/init.d/smgl_init + +required_executable $PROGRAM + +start() +{ + echo "Starting $DESC: $NAME" + loadproc $PROGRAM + evaluate_retval +} + +stop() +{ + echo "Stopping $DESC: $NAME " + killproc $PROGRAM + evaluate_retval +} + +status() +{ + statusproc $PROGRAM +} + +restart() +{ + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo "Restarting $DESC: $NAME" + stop + sleep 1 + start +} + |