summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-10 21:20:49 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-11 17:56:27 +0200
commit75e56aedf0f021df02f98fb3e07de83c6e3fd0e1 (patch)
treedccafb8dd5a76f26e36d5f28725ccfb026061e9d /gnu/packages/linux.scm
parent93d2456cfc6cffa5b0c2d521542f80a04ef087ce (diff)
downloadpatches-75e56aedf0f021df02f98fb3e07de83c6e3fd0e1.tar
patches-75e56aedf0f021df02f98fb3e07de83c6e3fd0e1.tar.gz
gnu: thinkfan: Fix daemon path in init scripts.
* gnu/packages/linux.scm (thinkfan): Fix daemon path in init scripts. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm19
1 files changed, 12 insertions, 7 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fcea499227..550068156c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2622,15 +2622,20 @@ feature, and a laptop with an accelerometer. It has no effect on SSDs.")
`("-DUSE_ATASMART:BOOL=ON")
#:phases
(modify-phases %standard-phases
- ;; Install scripts for various foreign init systems.
+ ;; Install scripts for various foreign init systems. Also fix
+ ;; hard-coded path for daemon.
(add-after 'install 'install-rc-scripts
(lambda* (#:key outputs #:allow-other-keys)
- (for-each (cute install-file <>
- (string-append (assoc-ref outputs "out")
- "/share/thinkfan"))
- (find-files (string-append "../thinkfan-" ,version
- "/rcscripts")
- ".*"))
+ (let ((out (assoc-ref outputs "out"))
+ (files (find-files
+ (string-append "../thinkfan-" ,version "/rcscripts")
+ ".*")))
+ (substitute* files
+ (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
+ (string-append out "/sbin/" name)))
+ (for-each (cute install-file <>
+ (string-append out "/share/thinkfan"))
+ files))
#t)))))
(inputs
`(("libatasmart" ,libatasmart)))