Migrate all init scripts from legacy format to .service TOML units
Convert 14 config files from the legacy init script format (plain-text commands) to the systemd-style TOML .service format. The init daemon supports both formats; this eliminates the legacy path entirely so that all services use the richer, more structured TOML unit format. Key changes per config: - base.toml: split 00_base into 00_base.service (tmpdir) + 00_sudo.service (sudo daemon); remove redundant 00_drivers and 10_net (handled by existing .service files from the base recipe) - minimal.toml: split 30_console into 29_activate_console.service + 30_console.service + 31_debug_console.service - desktop-minimal.toml: convert 20_display and 30_console to .service, add 29_activate_console and 31_debug_console overrides - x11.toml: convert 10_dbus, 10_xenv, 20_orbital, 30_console - redoxer.toml: split 10_net into 10_smolnetd.service + 10_dhcpd.service, convert 30_redoxer - redbear-legacy-*.toml: update override references to .service paths - acid.toml, auto-test.toml, os-test.toml, sys-build.toml: direct conversions
This commit is contained in:
@@ -15,20 +15,46 @@ include = ["../desktop.toml"]
|
||||
|
||||
# Override orbital init to use contain_orblogin
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
path = "/usr/lib/init.d/20_orbital.service"
|
||||
data = """
|
||||
requires_weak 10_net
|
||||
notify audiod
|
||||
nowait VT=3 orbital contain_orblogin launcher
|
||||
[unit]
|
||||
description = "Orbital display (contain sandbox)"
|
||||
requires_weak = ["00_base.target"]
|
||||
|
||||
[service]
|
||||
cmd = "orbital"
|
||||
args = ["contain_orblogin", "launcher"]
|
||||
envs = { VT = "3" }
|
||||
type = "oneshot_async"
|
||||
"""
|
||||
|
||||
# Override console init to use contain
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
path = "/usr/lib/init.d/30_console.service"
|
||||
data = """
|
||||
requires_weak 20_orbital
|
||||
nowait getty --contain 2
|
||||
nowait getty --contain /scheme/debug/no-preserve -J
|
||||
[unit]
|
||||
description = "Console terminals (contained)"
|
||||
requires_weak = ["20_orbital.service"]
|
||||
|
||||
[service]
|
||||
cmd = "getty"
|
||||
args = ["--contain", "2"]
|
||||
type = "oneshot_async"
|
||||
respawn = true
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/31_debug_console.service"
|
||||
data = """
|
||||
[unit]
|
||||
description = "Debug console (contained)"
|
||||
requires_weak = ["30_console.service"]
|
||||
|
||||
[service]
|
||||
cmd = "getty"
|
||||
args = ["--contain", "/scheme/debug/no-preserve", "-J"]
|
||||
type = "oneshot_async"
|
||||
respawn = true
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
|
||||
@@ -36,18 +36,30 @@ website = {}
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/98_keygen_sh"
|
||||
path = "/usr/lib/init.d/98_keygen_sh.service"
|
||||
data = """
|
||||
requires_weak 10_net
|
||||
bash /root/keygen.sh
|
||||
[unit]
|
||||
description = "SSH key generation"
|
||||
requires_weak = ["00_base.target"]
|
||||
|
||||
[service]
|
||||
cmd = "bash"
|
||||
args = ["/root/keygen.sh"]
|
||||
type = "oneshot"
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/99_rustysd"
|
||||
path = "/usr/lib/init.d/99_rustysd.service"
|
||||
data = """
|
||||
requires_weak 98_keygen_sh
|
||||
# Undocumented usage of rsdctl, pointing to notifications dir
|
||||
RSDCTL_ADDR=/var/run/rustysd/control.socket rustysd --conf /etc/rustysd
|
||||
[unit]
|
||||
description = "Rustysd service manager"
|
||||
requires_weak = ["98_keygen_sh.service"]
|
||||
|
||||
[service]
|
||||
cmd = "rustysd"
|
||||
args = ["--conf", "/etc/rustysd"]
|
||||
envs = { RSDCTL_ADDR = "/var/run/rustysd/control.socket" }
|
||||
type = "oneshot_async"
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
|
||||
Reference in New Issue
Block a user