summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch')
-rw-r--r--app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch b/app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch
new file mode 100644
index 000000000000..a0896af3d264
--- /dev/null
+++ b/app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch
@@ -0,0 +1,39 @@
+https://github.com/vmatare/thinkfan/pull/61
+
+--- a/rcscripts/openrc/thinkfan.cmake
++++ b/rcscripts/openrc/thinkfan.cmake
+@@ -1,26 +1,19 @@
+ #!/sbin/openrc-run
+
++command="@CMAKE_INSTALL_PREFIX@/sbin/thinkfan"
++command_args="-q -s5 -c /etc/thinkfan.conf"
++pidfile="@PID_FILE@"
++
+ extra_started_commands="reload"
+
++required_files="/etc/thinkfan.conf"
++
+ depend() {
+ after modules
+ }
+
+-start() {
+- ebegin "Starting thinkfan"
+- start-stop-daemon --start --exec @CMAKE_INSTALL_PREFIX@/sbin/thinkfan -- -q -s5 -c /etc/thinkfan.conf
+- eend $?
+-}
+-
+-stop() {
+- ebegin "Stopping thinkfan"
+- start-stop-daemon --stop --exec @CMAKE_INSTALL_PREFIX@/sbin/thinkfan
+- eend $?
+-}
+-
+ reload() {
+- PID=$(<@PID_FILE@)
+- ebegin "Sending SIGHUP to thinkfan($PID)"
+- kill -HUP $PID
++ ebegin "Reloading ${SVCNAME}"
++ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+ }