Sometimes there needed a sequence of command which is executed before any services in the default runlevel started (eg create directory structure in the tmpfs), but which not nececary for system core boot (eg not suitable for runlevel "boot") Reproducible: Always I have created such script, which may be added to the "default" runlevel. But there needed some syntax changes in the comments, because my english is bad :)
Created attachment 183857 [details] init.d entry
Created attachment 183859 [details] conf.d entry for start
Created attachment 183861 [details] conf.d entry for stop
Do I understand it correctly: You want to have something like /etc/init.d/local, but executed at the end of runlevel boot? Do you have examples why we need this? Btw. why do you call it preboot? It is not run before booting :) Perhaps local.early is better.
no, i need a script which executes 1st when "default" runlevel starts. The boot runlevel is executed always, but this is user commands which needed to make services in be able to start or thing like this. yes, local.early or something like this is better name than preboot.
For me, it looks more like he wants to be able to ensure, that a certain script is run as the very first in a given runlevel. He said he doesn't want it in the boot level, cause it's needed only for the given runlevel.
as example - create directory structure in tmpfs for programs which doesn't do this automatically, but configured to use them.
by the way: redhat/suse/debian have such script :)
Just create your init script. Put it in /etc/init.d and make sure you've got depend() { before * } Then add it to the default runlevel. This is definitely outside of the scope of what should go into OpenRC or baselayout.
yes, as Cardoe says, this is already possible