guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: thinkfan: Fix daemon path in init scripts.


From: Ludovic Courtès
Subject: 01/02: gnu: thinkfan: Fix daemon path in init scripts.
Date: Wed, 11 May 2016 16:16:24 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 75e56aedf0f021df02f98fb3e07de83c6e3fd0e1
Author: Nicolas Goaziou <address@hidden>
Date:   Tue May 10 21:20:49 2016 +0200

    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 <address@hidden>
---
 gnu/packages/linux.scm |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fcea499..5500681 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]