From 4e7dd690ccf318002c8ab6bf5d70dabc770cadfe 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 13863fe9..7e9fa086 100755 --- a/sys-utils/cartesi-init/cartesi-init +++ b/sys-utils/cartesi-init/cartesi-init @@ -23,6 +23,9 @@ busybox stty -onlcr export PATH [ -f /etc/environment ] && . /etc/environment +# 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