From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Add thinkfan.
Date: Tue, 10 May 2016 21:25:05 +0200 [thread overview]
Message-ID: <874ma5lnqm.fsf@saiph.selenimh> (raw)
In-Reply-To: <87zirzzl71.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 09 May 2016 10:31:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
Hello,
ludo@gnu.org (Ludovic Courtès) writes:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>> I realize there are hard-coded paths in init scripts. Would it make
>> sense to patch them so as to refer to `thinkfan' in store instead of
>> "/usr/sbin/thinkfan"?
>
> Yes, I think so.
Here's the patch, then.
Regards,
--
Nicolas Goaziou 0x80A93738
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: thinkfan: fix hard-coded paths --]
[-- Type: text/x-diff, Size: 1978 bytes --]
From f6e8845b46cd469a2e9a8540879436671944c87e Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue, 10 May 2016 21:20:49 +0200
Subject: [PATCH] gnu: thinkfan: Fix daemon path in init scripts.
* gnu/packages/linux.scm (thinkfan): Fix daemon path in init scripts.
---
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)))
--
2.7.4
next prev parent reply other threads:[~2016-05-10 19:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-30 23:05 [PATCH] Add thinkfan Nicolas Goaziou
2016-05-01 21:14 ` Leo Famulari
2016-05-01 21:24 ` Kei Yamashita
2016-05-03 22:12 ` Nicolas Goaziou
2016-05-06 18:13 ` Leo Famulari
2016-05-06 23:42 ` Nicolas Goaziou
2016-05-07 2:58 ` Leo Famulari
2016-05-07 9:47 ` Nicolas Goaziou
2016-05-09 8:31 ` Ludovic Courtès
2016-05-10 19:25 ` Nicolas Goaziou [this message]
2016-05-11 15:57 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ma5lnqm.fsf@saiph.selenimh \
--to=mail@nicolasgoaziou.fr \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.