Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenWrt] Fix unknown service manager exception (BOOT-5104) #1620

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/tests_boot_services
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
# runit - Used by Artix, Devuan, Dragora and Void
# systemd - Common option with more Linux distros implementing it
# upstart - Used by Debian/Ubuntu
# procd - Used by OpenWrt
Register --test-no BOOT-5104 --weight L --network NO --category security --description "Determine service manager"
if [ ${SKIPTEST} -eq 0 ]; then
BOOT_LOADER_SEARCHED=1
Expand Down Expand Up @@ -111,9 +112,12 @@
runit)
SERVICE_MANAGER="runit"
;;
openrc-init)
openrc-init)
SERVICE_MANAGER="openrc"
;;
procd)
SERVICE_MANAGER="procd"
;;
*)
CONTAINS_SYSTEMD=$(echo ${SHORTNAME} | ${GREPBINARY} "systemd")
if [ -n "${CONTAINS_SYSTEMD}" ]; then
Expand Down Expand Up @@ -280,7 +284,7 @@
BOOT_LOADER_SEARCHED=1
CURRENT_BOOT_LOADER=$(${BOOTCTLBINARY} status --no-pager 2>/dev/null | ${AWKBINARY} '/Current Boot Loader/{ getline; print $2 }')
if [ "${CURRENT_BOOT_LOADER}" = "systemd-boot" ]; then
Display --indent 2 --text "- Checking systemd-boot presence" --result "${STATUS_FOUND}" --color GREEN
Display --indent 2 --text "- Checking systemd-boot presence" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: found systemd-boot"
BOOT_LOADER="systemd-boot"
BOOT_LOADER_FOUND=1
Expand Down