diff options
author | Johannes Heimansberg <git@jhe.dedyn.io> | 2021-04-25 11:52:56 +0300 |
---|---|---|
committer | Johannes Heimansberg <git@jhe.dedyn.io> | 2021-04-25 11:54:00 +0300 |
commit | 1d45d5534e7c19d3f6d1d643330adf77fdb23f38 (patch) | |
tree | 34eec8e6a83a4a8fd7c2a011575ba1d6754ed553 /include/tests_boot_services | |
parent | f41a2ead38cd7dd1f14fedcf4405da61adf37f88 (diff) |
[BOOT-5104] Add service manager detection support for runit
This fixes issue #1134.
Diffstat (limited to 'include/tests_boot_services')
-rw-r--r-- | include/tests_boot_services | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services index c3431fbd..93034422 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -63,6 +63,7 @@ # Description : Determine service manager # Notes : # initscripts - Used by Arch before + # runit - Used by Artix, Devuan, Dragora and Void # systemd - Common option with more Linux distros implementing it # upstart - Used by Debian/Ubuntu Register --test-no BOOT-5104 --weight L --network NO --category security --description "Determine service manager" @@ -71,7 +72,7 @@ case ${OS} in "Linux") if [ -f /proc/1/cmdline ]; then - OUTPUT=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | ${TRBINARY} '\0' ' ' | ${SEDBINARY} 's/ $//') + OUTPUT=$(${AWKBINARY} '/(^\/|init|runit)/ { print $1 }' /proc/1/cmdline | ${TRBINARY} '\0' ' ' | ${SEDBINARY} 's/ $//') LogText "Result: cmdline found = ${OUTPUT}" FILENAME=$(echo "${OUTPUT}" | ${AWKBINARY} '{print $1}') LogText "Result: file on disk = ${FILENAME}" @@ -108,6 +109,9 @@ upstart) SERVICE_MANAGER="upstart" ;; + runit) + SERVICE_MANAGER="runit" + ;; *) CONTAINS_SYSTEMD=$(echo ${SHORTNAME} | ${GREPBINARY} "systemd") if [ -n "${CONTAINS_SYSTEMD}" ]; then |