From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SIoEEClywV6JDAAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 17:19:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qO7fCylywV57BgAAB5/wlQ (envelope-from ) for ; Sun, 17 May 2020 17:19:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DC6B294060B for ; Sun, 17 May 2020 17:19:36 +0000 (UTC) Received: from localhost ([::1]:41728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaMwp-0000OC-PW for larch@yhetil.org; Sun, 17 May 2020 13:19:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaMwP-0008JS-PO for guix-patches@gnu.org; Sun, 17 May 2020 13:19:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaMwP-0004Mh-F4 for guix-patches@gnu.org; Sun, 17 May 2020 13:19:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaMwP-0007Ag-BG for guix-patches@gnu.org; Sun, 17 May 2020 13:19:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40601] [PATCH 18/28] Replace the use of "which" by "command -v" Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 May 2020 17:19:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40601@debbugs.gnu.org Cc: Vincent Legoll Received: via spool by 40601-submit@debbugs.gnu.org id=B40601.158973591127373 (code B ref 40601); Sun, 17 May 2020 17:19:09 +0000 Received: (at 40601) by debbugs.gnu.org; 17 May 2020 17:18:31 +0000 Received: from localhost ([127.0.0.1]:44598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvn-00077L-4G for submit@debbugs.gnu.org; Sun, 17 May 2020 13:18:31 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvL-00072h-G6 for 40601@debbugs.gnu.org; Sun, 17 May 2020 13:18:04 -0400 Received: by mail-wm1-f65.google.com with SMTP id n18so3495404wmj.5 for <40601@debbugs.gnu.org>; Sun, 17 May 2020 10:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b8zuj8hs6ax7Gia8U2Nzy4X9a4KV7XYNtedTtT7AcKo=; b=Pel3bGEOvi4vyg5yvQdwOc+BBpo6G1MAcKiJLNhg6vb80sMi/vJOwwtMS1gZpY1KNI wGURtZNlaCjMmnA7YMMswLL9GJSgjy5C3HZpm2F+8HpLAGXpngqNUmZJAQL8729E8L3W bJ2l5capPam/tZgorPEV3sVmfKPQyBJXinASJarMHjmxVHsoFkIFFyVkldVYtofD/SOs 93a31V6wO1QI2Wt+Zw+EU6MmnOOK+kC1JEMXJXUjcggYY4UZvE3p3eCAfBP/WnesU+r3 nmrbPlnz8vzQLOVghM+Ttk2EfiV70B5WRGBw21N+8uNgJzd14E6teCgORFU2blaYreHz PyNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b8zuj8hs6ax7Gia8U2Nzy4X9a4KV7XYNtedTtT7AcKo=; b=NCAXNdamZkaGyvkaMyZx7eM+RL4J9DE+IbEr3A96PCe8vAbYKxfC+4hAL+v8HcXB9+ lytDwUmO6PogLAM5ctIPGsqy5ikxQuBbjJdyCai7JPKD2RkS76tcE3j29HDNRyAN+0If uDZtcexQrNMM03kxfBHYv/gjZf7r4YgkGGg4VW/frV/3zrlyNXqhjc5yelnCPsrdztYJ gZSTkvfShFw+Zvc0yY51SN+yMtybm1tp133eRCKEzvDJHQSda9xL5G1UACPoBSi6IJbw rLH6Pmo7lK4wUyLGZeoY3pVrsxPjAmc3BTEXRjiLWVyqJx+BCRC3Bm5DUZXkz2e8PPr7 90+Q== X-Gm-Message-State: AOAM533o2YEMw1clp8/4xvNmgPH9a4aS5+AFrdD5hkBkSVfClNyrMmQo AVRPTgHSb2NLgy38k8ISs6aDmesI X-Google-Smtp-Source: ABdhPJz4lQPUDBYeJBrb8Pq+y1MK0eF9LIzL+hCi7OBrzgknyJJ3iA/fvUVW2KvnU+IVqGx1hVrU9Q== X-Received: by 2002:a1c:1b4d:: with SMTP id b74mr14814438wmb.123.1589735877744; Sun, 17 May 2020 10:17:57 -0700 (PDT) Received: from localhost.localdomain (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id v126sm13305048wma.9.2020.05.17.10.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 10:17:57 -0700 (PDT) From: Vincent Legoll Date: Sun, 17 May 2020 19:17:15 +0200 Message-Id: <20200517171725.732-18-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200517171725.732-1-vincent.legoll@gmail.com> References: <20200517171725.732-1-vincent.legoll@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=Pel3bGEO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 4.09 X-TUID: XODJLenKq+Kd --- etc/guix-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index e350fdb052..596ceb5b39 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -38,7 +38,6 @@ REQUIRE=( "wget" "gpg" "grep" - "which" "sed" "sort" "getent" @@ -329,12 +328,13 @@ sys_create_build_user() _debug "--- [ $FUNCNAME ] ---" + NOLOGIN_SHELL="$(command -v nologin)" for i in $(seq -w 1 10); do if getent passwd "guixbuilder${i}" >/dev/null 2>&1; then if command -v usermod &>/dev/null; then _msg "${INF}user is already in the system, resetting" usermod -g guixbuild -G guixbuild \ - -d /var/empty -s "$(which nologin)" \ + -d /var/empty -s "${NOLOGIN_SHELL}" \ -c "Guix build user $i" \ "guixbuilder${i}" else @@ -343,12 +343,12 @@ sys_create_build_user() else if command -v useradd &>/dev/null; then useradd -g guixbuild -G guixbuild \ - -d /var/empty -s "$(which nologin)" \ + -d /var/empty -s "${NOLOGIN_SHELL}" \ -c "Guix build user $i" --system \ "guixbuilder${i}" _msg "${PAS}user added " elif command -v adduser &>/dev/null; then - adduser -G guixbuild -h /var/empty -s "$(which nologin)" \ + adduser -G guixbuild -h /var/empty -s "${NOLOGIN_SHELL}" \ -H -S "guixbuilder${i}" _msg "${PAS}user added " else -- 2.26.2