summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-03-29 23:13:32 +0100
committerLudovic Courtès <ludo@gnu.org>2024-03-30 01:01:32 +0100
commit6b138626e4dfed219941cc9e9466ec827493723d (patch)
treed094b21bd3c92f1abb1dc53061b81df8f3c4bcb5 /gnu
parented03a0aa9b353434bbd6dce47f1b82cbe6d14000 (diff)
downloadguix-6b138626e4dfed219941cc9e9466ec827493723d.tar.gz
services: postgresql: Simplify execution of ‘initdb’.
* gnu/services/databases.scm (postgresql-activation): Replace
‘primitive-exit’ + ‘system*’ with ‘execl’.

Change-Id: I491fd3093f67af59f240438d7d6123e769e4ec1e
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/databases.scm9
1 files changed, 3 insertions, 6 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index cb85d18e21..fa332d7978 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -273,12 +273,9 @@ host	all	all	::1/128 	md5"))
                       (lambda ()
                         (setgid (passwd:gid user))
                         (setuid (passwd:uid user))
-                        (primitive-exit
-                         (apply system*
-                                initdb
-                                "-D"
-                                #$data-directory
-                                initdb-args)))
+                        (apply execl initdb
+                               initdb "-D" #$data-directory
+                               initdb-args))
                       (lambda ()
                         (primitive-exit 1))))
                  (pid (waitpid pid))))))))))