Rigth now it looks like "procd" always executes everything inside "/etc/rc.d/" in "the same way" (ie. there is just one way to boot).

I would like to boot in one way or another (different network configuration, different services spawned, ...) depending on the value of a GPIO.

What would the "correct" way to do this be?

One option would be to modify all the scripts inside "/etc/init.d" so that they all check the GPIO value and, based on that, decide to exit immediately or start using one configuration or another. However this seems "dirty".

Can you think of a better way? I could maybe modify "procd" to, instead of directly executing the contents of " /etc/rc.d", call first a script whose output is the actual folder to execute (ex: the script would read the GPIO value and return "/etc/rc.d" -normal boot- or, maybe, "/etc/rc2.d" -special boot-).

Any other ideas would be greatly appreciated :)

Thanks.

(Last edited by wolander4 on 26 Jan 2018, 18:27)