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 GBdpDerghV9DcwAA0tVLHw (envelope-from ) for ; Tue, 13 Oct 2020 17:16:26 +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 EJofCerghV9tRAAAB5/wlQ (envelope-from ) for ; Tue, 13 Oct 2020 17:16:26 +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 861A29401DD for ; Tue, 13 Oct 2020 17:16:24 +0000 (UTC) Received: from localhost ([::1]:39946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSNuR-0003z5-EV for larch@yhetil.org; Tue, 13 Oct 2020 13:16:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSNrE-0001Iv-FW for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSNrC-00009g-HC for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSNrC-0005tY-BL for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43769] [PATCH v3 2/2] guix-install.sh: Check the service 'nscd' and suggest it. References: <20201002173537.12045-1-zimon.toutoune@gmail.com> In-Reply-To: <20201002173537.12045-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Oct 2020 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43769 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43769@debbugs.gnu.org Cc: ludo@gnu.org, me@tobias.gr, zimoun Received: via spool by 43769-submit@debbugs.gnu.org id=B43769.160260914322593 (code B ref 43769); Tue, 13 Oct 2020 17:13:02 +0000 Received: (at 43769) by debbugs.gnu.org; 13 Oct 2020 17:12:23 +0000 Received: from localhost ([127.0.0.1]:48695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqY-0005sK-My for submit@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:22 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqW-0005rv-GK for 43769@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:21 -0400 Received: by mail-wr1-f68.google.com with SMTP id s9so160515wro.8 for <43769@debbugs.gnu.org>; Tue, 13 Oct 2020 10:12:20 -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:mime-version :content-transfer-encoding; bh=hvaptL1TYXz1ht1Ynp1REq45HS1gztDXhicYBfeJKOY=; b=nshqzKTKPeCzfj+BmfTjt5Wh+FxZsj2UgQa/0kLjYDN9TuW9EjGoLMqGW7blr/YuZX eC14wPyYqBgkBoR9c0TW9SBO0SSMKRmMnm7AaEZsyhghFaO0tOFdR61f9vAQCuhz3zDk pm1HYXw/zdQPlx9Fhca99qxC/Gz8pWp/0Qgcs/gBxCpZLCyK8ta5cHJulRXP43hPuJMF 6tU6rSTwt1VGI7cla5/GLEt+xq5Rl94oHajaOUdhi3PRSou0YW5AJHg/V9hGGbiQp8mA lkX/+WRb02yttgDmJnzjKXrJOGp9I+/GlxiVNVJ8ztIsED5c2v+IGqWTdZOte89Jq4xb DtOQ== 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:mime-version :content-transfer-encoding; bh=hvaptL1TYXz1ht1Ynp1REq45HS1gztDXhicYBfeJKOY=; b=L0g6AKsBjzKL1ehdRNKdLqOx6Nrm/KJlP3lzU5fGbHqtai92dsKVB0YfJCSoo1TPvN auI2fQhF9EXFoi23rgsFYbO57iBKsttbKj54kkTykKScRGz23icB1BhkUCrysK2hVRlx ZarQSFiCyqEUMWJ0WdupRondkf5OVFlTzW0R0lkb6VzXz+cyysYVZzVtKTWZrSkHQ62L FIAH7hTmFOS5Q4fpJuf6pHWmbs56j6dYJcS+zsD+TmGtAVYpvboKvjajYRmbeexij5yP 8SjTS6YzRstDlJGfhVLttGfIsACyJVbyPIufozXZvdfUfIzAPcLp9NJQ9TGrotwjH+6R Bxmg== X-Gm-Message-State: AOAM531Yj4XmuIyaA/Dz0NKGyWgZCUfPuRZ/FX/BpYjKaLc8J77/EWx0 hDdD7ynhrqIiLxRa2SSruomB2Sgu41o= X-Google-Smtp-Source: ABdhPJyDsnqPFfecOADcOE0AnqlPf2AuKWM4/dnq2dbHgRiWgF6Uxtrfg90BfuNtXbRPxBp01aNy9Q== X-Received: by 2002:a5d:4141:: with SMTP id c1mr715173wrq.113.1602609134720; Tue, 13 Oct 2020 10:12:14 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o4sm293543wrv.8.2020.10.13.10.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:12:13 -0700 (PDT) From: zimoun Date: Tue, 13 Oct 2020 19:12:03 +0200 Message-Id: <20201013171204.14708-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 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=nshqzKTK; 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: 5.59 X-TUID: 15wNh6kkNPU/ Fixes . * etc/guix-install.sh (chk_sys_nscd): New function to check if the service 'nscd is running, otherwise suggest to install distribution-wide. --- etc/guix-install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index f51a1b653f..7f0dd00e53 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -55,6 +55,7 @@ REQUIRE=( PAS=$'[ \033[32;1mPASS\033[0m ] ' ERR=$'[ \033[31;1mFAIL\033[0m ] ' +WAR=$'[ \033[33;1mWARN\033[0m ] ' INF="[ INFO ] " DEBUG=0 @@ -200,6 +201,19 @@ chk_sys_arch() ARCH_OS="${arch}-${os}" } +chk_sys_nscd() +{ # Check if nscd is up and suggest to start it or install it + if [ "$(type -P pidof)" ]; then + if [ ! "$(pidof nscd)" ]; then + _msg "${WAR}We recommend installing and/or starting your distribution 'nscd' service" + _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi + else + _msg "${INF}We cannot determine if your distribution 'nscd' service is running" + _msg "${INF}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\"" + fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -523,6 +537,7 @@ main() chk_gpg_keyring chk_init_sys chk_sys_arch + chk_sys_nscd _msg "${INF}system is ${ARCH_OS}" -- 2.28.0