summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-08-24 11:24:30 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-08-26 09:24:44 +0900
commit5b54f83d875d968d578b1595e9fd290dbdf03d9b (patch)
tree856a410c4a2c607f3354817e906b124e83e9f9c9
parentec496b663448b2f2579c8a6094398ba9e2a21186 (diff)
gnu: openresolv: Fix nscd restart patch.
Previously, the patch would cause nscd to be started when it wasn't running. * gnu/packages/patches/openresolv-restartcmd-guix.patch: Check if nscd is running via the Shepherd API.
-rw-r--r--gnu/packages/patches/openresolv-restartcmd-guix.patch24
1 files changed, 5 insertions, 19 deletions
diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch
index 29a91fe595d..16171ed2c51 100644
--- a/gnu/packages/patches/openresolv-restartcmd-guix.patch
+++ b/gnu/packages/patches/openresolv-restartcmd-guix.patch
@@ -1,34 +1,20 @@
1From 439266671bbd790b3cb339c157c87db382e85c96 Mon Sep 17 00:00:00 2001 1Upstream-status: <https://github.com/NetworkConfiguration/openresolv/pull/51>
2From: Brice Waegeneire <brice@waegenei.re>
3Date: Sat, 9 May 2020 15:52:06 +0200
4Subject: [PATCH] Add RESTARTCMD for Guix System.
5
6---
7
8openresolv need to know how to restart the nscd service, this patch teach it
9to do it on Guix System by using shepherd.
10
11 resolvconf.in | 7 +++++++
12 1 file changed, 7 insertions(+)
13 2
14diff --git a/resolvconf.in b/resolvconf.in 3diff --git a/resolvconf.in b/resolvconf.in
15index aa77ffe..921882e 100644 4index 2f55a9d..c020413 100644
16--- a/resolvconf.in 5--- a/resolvconf.in
17+++ b/resolvconf.in 6+++ b/resolvconf.in
18@@ -375,6 +375,13 @@ detect_init() 7@@ -475,6 +475,13 @@ detect_init()
19 fi' 8 fi'
20 elif [ -d /etc/dinit.d ] && command -v dinitctl >/dev/null 2>&1; then 9 elif [ -d /etc/dinit.d ] && command -v dinitctl >/dev/null 2>&1; then
21 RESTARTCMD='dinitctl --quiet restart --ignore-unstarted $1' 10 RESTARTCMD='dinitctl --quiet restart --ignore-unstarted $1'
22+ elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then 11+ elif [ -x /run/current-system/profile/bin/herd ] >/dev/null 2>&1; then
23+ # Guix System 12+ # Guix System
24+ RESTARTCMD=' 13+ RESTARTCMD='
25+ if /run/current-system/profile/bin/herd status $1 2>&1 14+ if /run/current-system/profile/bin/herd eval root "(unless (lookup-running '\''$1) (error))" >/dev/null 2>&1
26+ then 15+ then
27+ /run/current-system/profile/bin/herd restart $1 16+ /run/current-system/profile/bin/herd restart $1
28+ fi' 17+ fi'
29 else 18 else
30 for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do 19 for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
31 [ -d $x ] || continue 20 [ -d $x ] || continue
32--
332.41.0
34