GNU bug report logs - #40601
guix-install.sh: port to other distros & init systems

Previous Next

Package: guix-patches;

Reported by: Vincent Legoll <vincent.legoll <at> gmail.com>

Date: Mon, 13 Apr 2020 16:05:01 UTC

Severity: normal

Tags: patch

Done: Vincent Legoll <vincent.legoll <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #205 received at 40601 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: 40601 <at> debbugs.gnu.org
Cc: Vincent Legoll <vincent.legoll <at> gmail.com>
Subject: [PATCH 4/5] guix-install.sh: Fix detection of SysV init system.
Date: Sun, 20 Dec 2020 18:28:38 +0100
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





This bug report was last modified 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.