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 WTDhJiqK319GfgAA0tVLHw (envelope-from ) for ; Sun, 20 Dec 2020 17:30:18 +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 mLIaIiqK318uCAAAbx9fmQ (envelope-from ) for ; Sun, 20 Dec 2020 17:30:18 +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 62634940366 for ; Sun, 20 Dec 2020 17:30:18 +0000 (UTC) Received: from localhost ([::1]:49600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr2XB-0004aN-Cg for larch@yhetil.org; Sun, 20 Dec 2020 12:30:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr2Wx-0004Zl-OO for guix-patches@gnu.org; Sun, 20 Dec 2020 12:30:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kr2Wx-0000C2-H2 for guix-patches@gnu.org; Sun, 20 Dec 2020 12:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kr2Wx-0001vM-EA for guix-patches@gnu.org; Sun, 20 Dec 2020 12:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#40601] [PATCH 4/5] guix-install.sh: Fix detection of SysV init system. Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Dec 2020 17:30:03 +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.16084853457230 (code B ref 40601); Sun, 20 Dec 2020 17:30:03 +0000 Received: (at 40601) by debbugs.gnu.org; 20 Dec 2020 17:29:05 +0000 Received: from localhost ([127.0.0.1]:45502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2W1-0001sS-72 for submit@debbugs.gnu.org; Sun, 20 Dec 2020 12:29:05 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:37178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2Vy-0001rG-7C for 40601@debbugs.gnu.org; Sun, 20 Dec 2020 12:29:02 -0500 Received: by mail-wm1-f53.google.com with SMTP id q75so8433105wme.2 for <40601@debbugs.gnu.org>; Sun, 20 Dec 2020 09:29:02 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=2VzI7wwzB0sun3AZD8tfCNLfrsTYlw4PkdKK/WMzhh8=; b=uLQy1gCAu2JYuH0LEcX4VSGomA500UEEyI+i48RB5m21SBaVMJ3Irro3pMloqJSwrg RcPjhpbVHkJeacbdGGlOmMZLLAtmCL6OVuQHve9/DH83MHb1HHptb5r0BTQMwEtzW7K/ WqLXXWvjB6jGloMDUpE5RyLutYkqP7Uqop7w2SPB7h+tQs90vW8DboBHVO7J3sEEyNLl 03MlhU/7g+wddrZbdNJDmTLomhKysx5VC4bNSURov4y/BbC1wlpuWRr4vjUO3i6lNLME XKy+z73amvcRiXAbvfLkUUE3gBFAALfbQX86xLlV+L5DIzTbuta1Hl3fFfq94a5HGrs5 Xo6A== 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=2VzI7wwzB0sun3AZD8tfCNLfrsTYlw4PkdKK/WMzhh8=; b=divP9dHHYP1m50FI9IA7dQwYM+gizELjYCYalwpTNIPFCcZzXjdIS2JL1cefxcodtt 5rHqxGeSDONy9kAWC+2KNglgAuwcwrcc/2HBgRIDG0wIyRr6CxOf7v25xkJ8s8BzG5T1 v5Kta3AEZKfYR6UDT56OVLHfuZ3BJYTfFyG/GEKfSt7CXptlPuN7PvZZQPUATMCUCDCj QH/enZnK5AWUCoirnLStGj7fz4X/TrVMBA+vTcSQSPEB96qLsfGmw7Cyo0HqXaALfXqD /bO7vlrUuCHaVC6ozRptZ97yc1jWpYBtONlItpI+l9HMTW+H/Gqvw34ZsxvELH5aHj1I 7ATA== X-Gm-Message-State: AOAM533PlIcAxBHdbHPXUEEWdozrO7w8fkKpDGcsWBl9/FFCDjvsXQAP ziQJMHY3SsUJzXP/hm1bZoIHkss67h4= X-Google-Smtp-Source: ABdhPJyQuKzJuKZA1MOWW5W+rmSX6rf8FoWYcpZcSTZ2dzmULB5s7+jFljoVGW3Zr9WLVtmxa8wZ6w== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr13116276wmg.152.1608485336638; Sun, 20 Dec 2020 09:28:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Dec 2020 09:28:56 -0800 (PST) From: Vincent Legoll Date: Sun, 20 Dec 2020 18:28:38 +0100 Message-Id: <20201220172839.3059-4-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201220172839.3059-1-vincent.legoll@gmail.com> References: <20201220172839.3059-1-vincent.legoll@gmail.com> 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=uLQy1gCA; 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: 62634940366 X-Spam-Score: 2.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: XFFQnSo2RN+I Checking the presence of a regular file & not symlink (/etc/init.d/cron) is not sufficient. Detect a sysvinit system by running `/sbin/init --version' and checking the output contains the string "SysV". * etc/guix-install.sh (chk_init_sys): fix sysvinit system detection. --- etc/guix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index d40d90b377..307c42d3fb 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -150,7 +150,7 @@ chk_init_sys() _msg "${INF}init system is: systemd" INIT_SYS="systemd" return 0 - elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then + elif /sbin/init --version 2>/dev/null | grep -q SysV; then _msg "${INF}init system is: sysv-init" INIT_SYS="sysv-init" return 0 -- 2.29.2