From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 20 12:29:05 2020 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 To: 40601@debbugs.gnu.org Subject: [PATCH 4/5] guix-install.sh: Fix detection of SysV init system. 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40601 Cc: Vincent Legoll X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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