From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id BSE+GfTGeF8WeQAA0tVLHw (envelope-from ) for ; Sat, 03 Oct 2020 18:46:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QxSxFPTGeF/VOAAAbx9fmQ (envelope-from ) for ; Sat, 03 Oct 2020 18:46:12 +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 C550F9400BF for ; Sat, 3 Oct 2020 18:46:11 +0000 (UTC) Received: from localhost ([::1]:50632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOmXq-0002rL-DY for larch@yhetil.org; Sat, 03 Oct 2020 14:46:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOmXi-0002r4-Tx for guix-patches@gnu.org; Sat, 03 Oct 2020 14:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOmXi-000233-JC for guix-patches@gnu.org; Sat, 03 Oct 2020 14:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kOmXi-0001iG-Hp for guix-patches@gnu.org; Sat, 03 Oct 2020 14:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43769] [PATCH v2 2/2] guix-install.sh: Check the service 'nscd' and suggest it. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Oct 2020 18:46: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: zimoun Received: via spool by 43769-submit@debbugs.gnu.org id=B43769.16017507216527 (code B ref 43769); Sat, 03 Oct 2020 18:46:02 +0000 Received: (at 43769) by debbugs.gnu.org; 3 Oct 2020 18:45:21 +0000 Received: from localhost ([127.0.0.1]:44479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmX2-0001hD-NF for submit@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:21 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:35710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOmX1-0001go-Dm for 43769@debbugs.gnu.org; Sat, 03 Oct 2020 14:45:19 -0400 Received: by mail-wm1-f41.google.com with SMTP id y15so4970910wmi.0 for <43769@debbugs.gnu.org>; Sat, 03 Oct 2020 11:45:19 -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=KBsbxztc72itiCXOMZUhiI9V5YaodIa3hkKIusxIXeE=; b=kFZpDX9yYAsGQIG35rnwUWajPUQc1STLx1t1AJhkS9KRzTr+sLkQL1PSPToJCP2ZIl vTfTNa61NLZIuEOh98wef3zmBTf5l2DUlPlySwuU+A+rHGS6dfxfue5J75gKU2speVj+ yRXIlaXhIyjveh8kQD6gRkaBiIfwwOyVuQar4i80SuOWbjQ7xx5wbDG9yhbogvAjXaTP 94w21mfzVBViRHUZTEauQubeGi0t6x8KEd2f8fRfPpvgTGVW6M4Gl2OiwZwXg7q2B/i+ bKBlgnBZ3T/X8lDxTHOfX/Ru9WWjzuLH4JGZutgxpJ591LGyuYq8Lh5lVtVeQB5U+nQZ MSiw== 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=KBsbxztc72itiCXOMZUhiI9V5YaodIa3hkKIusxIXeE=; b=Gi2LySz0pgUnTZkXksFLmmWw1mAZ9939tpm0QmmXYYADAaxP0Dbr/IoQKery2oIl55 riw0F7egJagXHLIxT/LhL0BrWxv9wQ2Hl/7Z6noYJVjV0eJ+m0pemi7/5vw5Jt6MiTbD C3A6XrmNAiZDo/YH0bTLzyqJ3uJ7Y0yphpRl+5atR8k+vc7pVIK++UlHYwiBGsH7vpG2 EX7xO3DvRarxxZxm5FVfQS1fgf1YwVQ4z8qOqtmoTim6UaoY7d+Qj3NfxN0+oCF869nn rN5tywZaVSjdlTreNczsF0MIX57EqLcKui+q16oM/2cchqW1M8qA8VLcxoA94obmB4Fh 3ybw== X-Gm-Message-State: AOAM530WH6o9bdY2BhwJPJXVSpCPnwo9RyfLQXwNyc8dWHb9YaqDHWkB BQ3YVaDOidox/ytpzlfnYArrbd/h6hQ= X-Google-Smtp-Source: ABdhPJwdim8zpCVr9EaRyErAQMMok8Ua/qrDalsuSQzEhhnkZsj2CkulnGZafFpX0eu3lEMOlsNmyA== X-Received: by 2002:a1c:4b13:: with SMTP id y19mr9005552wma.33.1601750713375; Sat, 03 Oct 2020 11:45:13 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u81sm2993224wmg.43.2020.10.03.11.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 11:45:13 -0700 (PDT) From: zimoun Date: Sat, 3 Oct 2020 20:44:47 +0200 Message-Id: <20201003184447.9542-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201003184447.9542-1-zimon.toutoune@gmail.com> References: <20201003184447.9542-1-zimon.toutoune@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=kFZpDX9y; 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: VU76s1fU0Vb+ 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 | 66 ++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index a5da198eb0..5bda31de2e 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,40 +537,42 @@ EOF main() { - local tmp_path - welcome + # local tmp_path + # welcome + + # _msg "Starting installation ($(date))" - _msg "Starting installation ($(date))" + # chk_term + # chk_require "${REQUIRE[@]}" + # chk_gpg_keyring + # chk_init_sys + # chk_sys_arch - chk_term - chk_require "${REQUIRE[@]}" - chk_gpg_keyring - chk_init_sys - chk_sys_arch + # _msg "${INF}system is ${ARCH_OS}" - _msg "${INF}system is ${ARCH_OS}" + # umask 0022 + # tmp_path="$(mktemp -t -d guix.XXX)" - umask 0022 - tmp_path="$(mktemp -t -d guix.XXX)" + # guix_get_bin_list "${GNU_URL}" + # guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" - guix_get_bin_list "${GNU_URL}" - guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" + # sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" + # sys_create_build_user + # sys_enable_guix_daemon + # sys_authorize_build_farms + # sys_create_init_profile + # sys_create_shell_completion - sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" - sys_create_build_user - sys_enable_guix_daemon - sys_authorize_build_farms - sys_create_init_profile - sys_create_shell_completion + # _msg "${INF}cleaning up ${tmp_path}" + # rm -r "${tmp_path}" - _msg "${INF}cleaning up ${tmp_path}" - rm -r "${tmp_path}" + chk_sys_nscd - _msg "${PAS}Guix has successfully been installed!" - _msg "${INF}Run 'info guix' to read the manual." + # _msg "${PAS}Guix has successfully been installed!" + # _msg "${INF}Run 'info guix' to read the manual." - # Required to source /etc/profile in desktop environments. - _msg "${INF}Please log out and back in to complete the installation." + # # Required to source /etc/profile in desktop environments. + # _msg "${INF}Please log out and back in to complete the installation." } main "$@" -- 2.28.0