From 8e9071b42a9cd334c863f461324460288e7e89d0 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 4 Apr 2024 16:14:21 -0300 Subject: [PATCH] feat: allow to customize init with /etc/cartesi-init.d --- sys-utils/cartesi-init/cartesi-init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys-utils/cartesi-init/cartesi-init b/sys-utils/cartesi-init/cartesi-init index 1bc31f35..86f99e9e 100755 --- a/sys-utils/cartesi-init/cartesi-init +++ b/sys-utils/cartesi-init/cartesi-init @@ -23,6 +23,9 @@ busybox stty -onlcr [ -f /etc/environment ] && . /etc/environment export PATH +# execute scripts in cartesi-init.d +[ -d /etc/cartesi-init.d ] && for f in /etc/cartesi-init.d/*; do [ -x $f ] && . $f; done + # execute init from device tree when available [ -f /proc/device-tree/cartesi-machine/init ] && . /proc/device-tree/cartesi-machine/init