Browse Source

Change default: LOCAL=!yes; add /etc/rc.local, select /etc/local.d/*.start to /etc/66/rc.local

Signed-off-by: Strahinya Radich <strajder@artixlinux.org>

Revert /etc/66/rc.local, convert logic to execlineb inside local-rc

Signed-off-by: Strahinya Radich <strajder@artixlinux.org>

Process all /etc/local.d/*.start scripts; change ordering; add [stop]

Signed-off-by: Strahinya Radich <strajder@artixlinux.org>

Remove /etc/rc.local as it is executed by /etc/local.d/local.start; remove sh -c

Signed-off-by: Strahinya Radich <strajder@artixlinux.org>
master
Strahinya Radich 4 months ago committed by Nathan
parent
commit
79e081a21a
  1. 4
      configure
  2. 32
      module/boot@/service/local/local-rc

4
configure vendored

@ -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'

32
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]

Loading…
Cancel
Save