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 <gabriel.valcazar@digi.com>
This commit is contained in:
parent
6aa852dccd
commit
6caecc5c53
|
|
@ -15,13 +15,13 @@
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
POWEROFF_TIME="10"
|
HALT_TIME="10"
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
[ "${#}" != "0" ] && printf "\n[ERROR]: %s\n\n" "${1}"
|
[ "${#}" != "0" ] && printf "\n[ERROR]: %s\n\n" "${1}"
|
||||||
echo "The system will poweroff in ${POWEROFF_TIME} seconds"
|
echo "The system will halt in ${HALT_TIME} seconds"
|
||||||
sleep "${POWEROFF_TIME}"
|
sleep "${HALT_TIME}"
|
||||||
sync && poweroff -f
|
sync && busybox halt -f
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue