Skip to content

Commit

Permalink
Merge pull request #38 from thin-edge/fix-sysvinit-is_available-detec…
Browse files Browse the repository at this point in the history
…tion

improve detection of sysvinit is_available
  • Loading branch information
reubenmiller authored Nov 18, 2023
2 parents 2dd1d5d + 1408b8c commit 77275a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/tedgectl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77275a5

Please sign in to comment.