From 6caecc5c5369d87400d6134da3b0ba32c35b2518 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 12 Feb 2020 15:42:43 +0100 Subject: [PATCH] trustfence-initramfs: use "busybox halt" instead of "poweroff" The poweroff command is not available in the initramfs due to a missing sysvinit/systemd dependency. Use the busybox "halt" command, since it's available regardless of the init manager used. Rework the error message and script variables accordingly. https://jira.digi.com/browse/DEL-6983 Signed-off-by: Gabriel Valcazar --- .../trustfence-initramfs/trustfence-initramfs-init_mmc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/trustfence-initramfs-init_mmc b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/trustfence-initramfs-init_mmc index ce5e3912f..a0d569e2d 100644 --- a/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/trustfence-initramfs-init_mmc +++ b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/trustfence-initramfs-init_mmc @@ -15,13 +15,13 @@ # #=============================================================================== -POWEROFF_TIME="10" +HALT_TIME="10" error() { [ "${#}" != "0" ] && printf "\n[ERROR]: %s\n\n" "${1}" - echo "The system will poweroff in ${POWEROFF_TIME} seconds" - sleep "${POWEROFF_TIME}" - sync && poweroff -f + echo "The system will halt in ${HALT_TIME} seconds" + sleep "${HALT_TIME}" + sync && busybox halt -f } # Main