gnu: KDE Frameworks: Update to 5.70.
[jackhill/guix/guix.git] / gnu / packages / patches / openresolv-restartcmd-guix.patch
1 From 7f0ce36828ec1e130bee857b8236ca091e4d8a2c Mon Sep 17 00:00:00 2001
2 From: Brice Waegeneire <brice@waegenei.re>
3 Date: Sat, 9 May 2020 15:52:06 +0200
4 Subject: [PATCH] Add RESTARTCMD for Guix System.
5
6 ---
7
8 openresolv need to know how to restart the nscd service, this patch teach it
9 to do it on Guix System by using shepherd.
10
11 resolvconf.in | 7 +++++++
12 1 file changed, 7 insertions(+)
13
14 diff --git a/resolvconf.in b/resolvconf.in
15 index 3cad04d..5ef5294 100644
16 --- a/resolvconf.in
17 +++ b/resolvconf.in
18 @@ -369,6 +369,13 @@ detect_init()
19 then
20 /etc/rc.d/$1 restart
21 fi'
22 + elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then
23 + # Guix System
24 + RESTARTCMD='
25 + if /run/current-system/profile/bin/herd status $1 2>&1
26 + then
27 + /run/current-system/profile/bin/herd restart $1
28 + fi'
29 else
30 for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
31 [ -d $x ] || continue
32 --
33 2.26.0
34