[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands
From: |
Maxim Cournoyer |
Subject: |
[bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands from requirements. |
Date: |
Thu, 19 Dec 2024 16:45:32 +0900 |
* etc/guix-install.sh (REQUIRE): Remove "which". Add "nologin".
(sys_create_build_user): Use 'type' instead of 'which'.
Fixes: <https://issues.guix.gnu.org/74952>
Reported-by: Simon Josefsson <simon@josefsson.org>
Change-Id: I0675716bab3fc22d3289ee7af2cb0ab33a1cee71
---
Changes in v3:
- New.
etc/guix-install.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 8d3d9d224b..fb22287cf4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -58,7 +58,7 @@ REQUIRE=(
"wget"
"gpg"
"grep"
- "which"
+ "nologin"
"sed"
"sort"
"getent"
@@ -429,12 +429,12 @@ sys_create_build_user()
if id "guixbuilder${i}" &>/dev/null; then
_msg "${INF}user is already in the system, reset"
usermod -g guixbuild -G "guixbuild${KVMGROUP}" \
- -d /var/empty -s "$(which nologin)" \
+ -d /var/empty -s "$(type -P nologin)" \
-c "Guix build user $i" \
"guixbuilder${i}";
else
useradd -g guixbuild -G "guixbuild${KVMGROUP}" \
- -d /var/empty -s "$(which nologin)" \
+ -d /var/empty -s "$(type -P nologin)" \
-c "Guix build user $i" --system \
"guixbuilder${i}";
_msg "${PAS}user added <guixbuilder${i}>"
--
2.46.0
[bug#74962] [PATCH] etc/guix-install.sh: Explicit shebang to use /usr/bin/env., Ludovic Courtès, 2024/12/26