diff --git a/configure b/configure index e39395a..cace910 100755 --- a/configure +++ b/configure @@ -40,7 +40,7 @@ Fine tunning of boot configuration: --SYSCTL=BOOLEAN configure kernel runtime with sysctl [!yes] --SYSUSER=BOOLEAN Run sysusers on boot --FORCECHCK=BOOLEAN force a check of the filesystem [!no] - --LOCAL=BOOLEAN use rc.local scripts [!no] + --LOCAL=BOOLEAN use rc.local scripts [!yes] --CONTAINER=BOOLEAN boot inside a container [!no] --TMPFILE=BOOLEAN use tmpfiles.d files [!yes] --MODULE_KERNEL=BOOLEAN load modules kernel [!yes] @@ -157,7 +157,7 @@ UDEV='!yes' SYSCTL='!yes' SYSUSER='!yes' FORCECHCK='!no' -LOCAL='!no' +LOCAL='!yes' CONTAINER='!no' TMPFILE='!yes' MODULE_KERNEL='!yes' diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc index 7890b73..5d5ca19 100644 --- a/module/boot@/service/local/local-rc +++ b/module/boot@/service/local/local-rc @@ -19,13 +19,33 @@ [start] @execute = ( - if { 66-yeller -cdp local-rc -1 /dev/console starts... } - if -nt { - - ${script_file} + if { 66-yeller -cdp local-rc -1 /dev/console starts... } + if -nt { + # - Execute /etc/local.d/*.start scripts if they are +x + # - Execute ${script_file} + foreground { + elglob -0 start_scripts /etc/local.d/*.start + forx -E script { ${start_scripts} } + if { test -x ${script} } + ${script} + } + ${script_file} + } + 66-yeller -fcdp local-rc -1 /dev/console crashed! +) - } - 66-yeller -fcdp local-rc -1 /dev/console crashed! +[stop] +@execute = +( + if { 66-yeller -cdp local-rc -1 /dev/console stops... } + if -nt { + # - Execute /etc/local.d/*.stop scripts if they are +x + elglob -0 stop_scripts /etc/local.d/*.stop + forx -E script { ${stop_scripts} } + if { test -x ${script} } + ${script} + } + 66-yeller -fcdp local-rc -1 /dev/console crashed! ) [environment]