unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 2fd0e87590f2a3574e87fe3a5c64140e84ccfd02 788 bytes (raw)
name: gnu/packages/patches/openresolv-restartcmd-guix.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
From 7f0ce36828ec1e130bee857b8236ca091e4d8a2c Mon Sep 17 00:00:00 2001
From: Brice Waegeneire <brice@waegenei.re>
Date: Sat, 9 May 2020 15:52:06 +0200
Subject: [PATCH] Add RESTARTCMD for Guix System.

---
 resolvconf.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/resolvconf.in b/resolvconf.in
index 3cad04d..5ef5294 100644
--- a/resolvconf.in
+++ b/resolvconf.in
@@ -369,6 +369,13 @@ detect_init()
 			then
 				/etc/rc.d/$1 restart
 			fi'
+	elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then
+		# Guix System
+		RESTARTCMD='
+			if /run/current-system/profile/bin/herd status $1 2>&1
+			then
+				/run/current-system/profile/bin/herd restart $1
+			fi'
 	else
 		for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
 			[ -d $x ] || continue
-- 
2.26.0


debug log:

solving 2fd0e87590 ...
found 2fd0e87590 in https://yhetil.org/guix-patches/20200511185310.24537-1-brice@waegenei.re/

applying [1/1] https://yhetil.org/guix-patches/20200511185310.24537-1-brice@waegenei.re/
diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch
new file mode 100644
index 0000000000..2fd0e87590

1:21: space before tab in indent.
 			then
1:22: space before tab in indent.
 				/etc/rc.d/$1 restart
1:23: space before tab in indent.
 			fi'
1:31: space before tab in indent.
 	else
1:32: space before tab in indent.
 		for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
Checking patch gnu/packages/patches/openresolv-restartcmd-guix.patch...
Applied patch gnu/packages/patches/openresolv-restartcmd-guix.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 2fd0e87590f2a3574e87fe3a5c64140e84ccfd02	gnu/packages/patches/openresolv-restartcmd-guix.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).