From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OCooFhkX1F5gUAAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 20:44:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8HkLEhkX1F5GRQAA1q6Kng (envelope-from ) for ; Sun, 31 May 2020 20:44:09 +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 E2610940145 for ; Sun, 31 May 2020 20:44:08 +0000 (UTC) Received: from localhost ([::1]:50478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfUoR-0006da-Qt for larch@yhetil.org; Sun, 31 May 2020 16:44:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfUoM-0006c6-MD for guix-patches@gnu.org; Sun, 31 May 2020 16:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfUoM-0000q9-Cb for guix-patches@gnu.org; Sun, 31 May 2020 16:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfUoM-0007Je-AJ for guix-patches@gnu.org; Sun, 31 May 2020 16:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40601] [PATCH 1/7] 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, 31 May 2020 20:44:02 +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.159095781028003 (code B ref 40601); Sun, 31 May 2020 20:44:02 +0000 Received: (at 40601) by debbugs.gnu.org; 31 May 2020 20:43:30 +0000 Received: from localhost ([127.0.0.1]:33927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfUnq-0007Ha-AQ for submit@debbugs.gnu.org; Sun, 31 May 2020 16:43:30 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfUno-0007HI-RD for 40601@debbugs.gnu.org; Sun, 31 May 2020 16:43:29 -0400 Received: by mail-wm1-f66.google.com with SMTP id c71so8818321wmd.5 for <40601@debbugs.gnu.org>; Sun, 31 May 2020 13:43:28 -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=VUi2SsoAaClYlftOEEn4+ZZHwioAk5gIhNv99Z/xAq0=; b=lz4jDi4PgkVXEunwZe5/L0FqdbBzb29qV7tb4rOqmVVtAcUxY+a9uSIHPvJa384Qe8 FQqTmNr4TMHMIYSPx/1dZhFJkZSIo6jp4SYqEUkmZOX/kgmKSkcRouG/8gdAs3lgW5I5 ohjKHUQ8C8mdapt7d68RS6wOrrOq9sCH1MQNVjpAUvI4GnFejJVTJnriYznQGCZ65Wjs K0q4dMk8R3K7FqlpHvIjdenM9x8YhhdE5TWFXMjZeq5SSn5jlPIbNl0ZcFslrZuWahlX PPHlyUyPSmHsRUP45pqfbGITEqPalT5748XI+3G+gZCshqkFYLpB1/XZg6nXGpfuS4so j4sw== 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=VUi2SsoAaClYlftOEEn4+ZZHwioAk5gIhNv99Z/xAq0=; b=I0O0DLPRhr1mqtTER1hAngeNNk+9GuIHWd30GCe+05v0G/fMCyo/zi2ZSiwRjzLRq/ 3aP3AK0Pfwzhpo85xn7klU5bzQA4Bz0OqLNNsrxvYuPHXN+PNOyxXstYZgoxJaQp/uic h52fyqscwzEqtj/SxtkagfnYFIinwJLPrPkzdhOA5D1bPNlyaoJ2iQK7eeni9rfoXsA8 vgbPt1siwgZVlXYCBbCp6PrjLG0zAsv6qjOTti7uV0WqcICYXLF3TeazroShb1q2aluU ILHPN/CaRkuRW3lFiZo03QDIUsJWyfYIXLAbNGdkTzX2hIBl4kh7R8hulDkWtwMVMMa1 V+mg== X-Gm-Message-State: AOAM531bj3n0oaTWJYzA2e/aPjoro8tCpadG3tS8BKVUurkQl+RUUHqE cQNkIogPQ6wsP1y3vt5zcqE43z4G X-Google-Smtp-Source: ABdhPJyztxevd+eNeK949jqIBb+zv1IZ+ZmuUQHQN8PkLxiCVXeKaqSpzeNanKV7gXw+tf0B/pOdhQ== X-Received: by 2002:a1c:3281:: with SMTP id y123mr18385728wmy.30.1590957802838; Sun, 31 May 2020 13:43:22 -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 w10sm18728850wrp.16.2020.05.31.13.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 13:43:22 -0700 (PDT) From: Vincent Legoll Date: Sun, 31 May 2020 22:42:51 +0200 Message-Id: <20200531204257.18725-1-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.26.2 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=lz4jDi4P; 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: uk1ZECioKxqT * 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 bf15aede21..455e021684 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -138,11 +138,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.26.2