From 1408b8cf22dafbf01a4e3250eded5bae048d5bb0 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Sat, 18 Nov 2023 19:33:21 +0100 Subject: [PATCH] improve detection of sysvinit is_available --- services/tedgectl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/tedgectl b/services/tedgectl index 32074f6..00bae47 100755 --- a/services/tedgectl +++ b/services/tedgectl @@ -77,7 +77,8 @@ manage_sysvinit() { is_available) # service --status-all does not run on some systems (e.g. older yocto versions) if command -V pidof >/dev/null 2>&1; then - [ "$(pidof /sbin/init)" = "1" ] + # sysvinit can be either called using /sbin/init or /init + [ "$(pidof /sbin/init)" = "1" ] || [ "$(pidof init)" = "1" ] elif command -V grep >/dev/null 2>&1; then /sbin/init --version | grep -qi sysv else