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 QNJCMveJ318sYQAA0tVLHw (envelope-from ) for ; Sun, 20 Dec 2020 17:29:27 +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 YDUZLveJ31+NTQAAB5/wlQ (envelope-from ) for ; Sun, 20 Dec 2020 17:29:27 +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 964B5940357 for ; Sun, 20 Dec 2020 17:29:27 +0000 (UTC) Received: from localhost ([::1]:48190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr2WM-0003qx-JC for larch@yhetil.org; Sun, 20 Dec 2020 12:29:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr2Vy-0003pw-DU for guix-patches@gnu.org; Sun, 20 Dec 2020 12:29:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kr2Vy-0008Jn-6p for guix-patches@gnu.org; Sun, 20 Dec 2020 12:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kr2Vy-0001rl-0b for guix-patches@gnu.org; Sun, 20 Dec 2020 12:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#40601] [PATCH 1/5] guix-install.sh: Remove "[[" bashisms in chk_init_sys(). References: <58b21d29-f0b0-af8a-8c9e-11f4dd7a317a@gmail.com> In-Reply-To: <58b21d29-f0b0-af8a-8c9e-11f4dd7a317a@gmail.com> Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Dec 2020 17:29:01 +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 Received: via spool by 40601-submit@debbugs.gnu.org id=B40601.16084853387158 (code B ref 40601); Sun, 20 Dec 2020 17:29:01 +0000 Received: (at 40601) by debbugs.gnu.org; 20 Dec 2020 17:28:58 +0000 Received: from localhost ([127.0.0.1]:45491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2Vu-0001rO-DY for submit@debbugs.gnu.org; Sun, 20 Dec 2020 12:28:58 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:38692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2Vs-0001r7-Qf for 40601@debbugs.gnu.org; Sun, 20 Dec 2020 12:28:57 -0500 Received: by mail-wr1-f49.google.com with SMTP id r7so8376087wrc.5 for <40601@debbugs.gnu.org>; Sun, 20 Dec 2020 09:28:56 -0800 (PST) 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=rQAs9bMQieejJaGxFztBBnsnSvkWUUEcichMyaqhEmo=; b=imvNhxFvKtIvqX/G2j0rD4KTzTiXPualLHKF0jCQjTWUrZ7OjE6xFO7rqukCERAd4Q B5ssFj9jxgQZyK9neNUKd1TchNdFx+JoTk8usSlMz1aOAolkoERdxAA1BlyByZ1UEGCO DuVE90/DfVRyAOnxrUbZoH1GJMkZrWL4F9NKRNx2wY5TeVO2wFixbiqaPem2qSJNyMLd CCoUk5IVyWH2GB3Nz0jFihd6lP+aZm4jAxswnM9Sgs4XiVH9vzBJjA6xIgPZvhq5rjYp 59q/GGjCdYWE3Td2e2i6CcD1L6ADZ2GjRKBmwBQwRALxZUmeYymFZhQUq7RSGZ3wxTjG QiPg== 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=rQAs9bMQieejJaGxFztBBnsnSvkWUUEcichMyaqhEmo=; b=BAlIQpleg+vTZhLczluwRGaAPvKFnzAg1TsuNs5z1xioXDVve5w9v4mLWGVcAq/Zds 52lF9AP+wyQ5ZpWzkZUZG+1zTMd4G6rVBXq92igZSZI7C8BWpktcbUk/6+O8UKdeTNj+ cr6TsOID7FrEpUobycNs/31+/tY6AI2e/jMDV5rYrUvCwLjJbEEMYlNFnEORX/UoSqlM Ypj1UTiA2WG2R4vnJejuGrZPPk0hq8GEr3l+SCqWPhvZ9Hkoa0xYrw0nn6GshPXQ635/ zzwmneefBb9p0IUCOL5rHvXqDS3+N2SvgVMhVV59+UhvbOFqLwQ9dsUZwG9Oz6AQ6yI4 MijQ== X-Gm-Message-State: AOAM531PVcJxFt8XdgCIStUaqDHZt/P+3rezysNXditeMaAdnz0ce8+n fr1RWEOnSlHUTclJr7xEAIY0myjBq7M= X-Google-Smtp-Source: ABdhPJxMbYJ2Oj0zPVOQDG5mUey8rhLVWZxhLrIfmN3P/kBV2hmACdZ34uJyEiWWw03EbMGu6G6nGA== X-Received: by 2002:adf:ec8c:: with SMTP id z12mr14551171wrn.208.1608485330814; Sun, 20 Dec 2020 09:28:50 -0800 (PST) Received: from localhost.localdomain (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id h3sm20783535wmm.4.2020.12.20.09.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Dec 2020 09:28:49 -0800 (PST) From: Vincent Legoll Date: Sun, 20 Dec 2020 18:28:35 +0100 Message-Id: <20201220172839.3059-1-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vincent Legoll Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.78 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=imvNhxFv; 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-Migadu-Queue-Id: 964B5940357 X-Spam-Score: 2.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: BWIuBI4HhqVy * etc/guix-install.sh (chk_init_sys): Use `if something | grep' instead of "[[" pattern matching. --- etc/guix-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 9015f40bb6..26c8622855 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -143,11 +143,11 @@ chk_term() chk_init_sys() { # Return init system type name. - if [[ $(/sbin/init --version 2>/dev/null) =~ upstart ]]; then + if /sbin/init --version 2>/dev/null | grep -q upstart; then _msg "${INF}init system is: upstart" INIT_SYS="upstart" return 0 - elif [[ $(systemctl 2>/dev/null) =~ -\.mount ]]; then + elif systemctl 2>/dev/null | grep -q -- -\.mount; then _msg "${INF}init system is: systemd" INIT_SYS="systemd" return 0 -- 2.29.2