From d7444606cb241f7e3e9873049f82a0f0995170cc Mon Sep 17 00:00:00 2001 From: Vasilito Date: Thu, 23 Apr 2026 20:28:52 +0100 Subject: [PATCH] Add respawn and getty service config across all build targets Getty services now use respawn = true so init restarts them on exit. redbear-live-mini expanded with additional boot-late services and reorganized service ordering. Device services TOML gains new entries for hardened daemon lifecycle. --- config/redbear-desktop.toml | 2 + config/redbear-device-services.toml | 10 ++ config/redbear-greeter-services.toml | 15 ++- config/redbear-kde.toml | 3 + config/redbear-live-mini.toml | 183 ++++++++++++++------------- config/redbear-minimal.toml | 6 +- config/wayland.toml | 2 + 7 files changed, 124 insertions(+), 97 deletions(-) diff --git a/config/redbear-desktop.toml b/config/redbear-desktop.toml index f3319e20..998f71d9 100644 --- a/config/redbear-desktop.toml +++ b/config/redbear-desktop.toml @@ -83,6 +83,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -113,6 +114,7 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ [[files]] diff --git a/config/redbear-device-services.toml b/config/redbear-device-services.toml index f748b3c9..98d546df 100644 --- a/config/redbear-device-services.toml +++ b/config/redbear-device-services.toml @@ -7,6 +7,16 @@ redbear-quirks = {} pciids = {} fatd = {} +[[files]] +path = "/usr/lib/init.d/12_boot-late.target" +data = """ +[unit] +description = "Late boot services target" +requires_weak = [ + "00_base.target", +] +""" + [[files]] path = "/lib/firmware" data = "" diff --git a/config/redbear-greeter-services.toml b/config/redbear-greeter-services.toml index afcae581..21532cd9 100644 --- a/config/redbear-greeter-services.toml +++ b/config/redbear-greeter-services.toml @@ -2,6 +2,16 @@ # # This fragment is intended to be included by the active desktop/graphics target. +[[files]] +path = "/usr/lib/init.d/05_boot-essential.target" +data = """ +[unit] +description = "Boot essential services target" +requires_weak = [ + "00_base.target", +] +""" + [users.greeter] password = "" uid = 101 @@ -75,7 +85,6 @@ path = "/usr/lib/init.d/30_console.service" data = """ [unit] description = "Console terminals" -boot_essential = true requires_weak = [ "29_activate_console.service", ] @@ -84,6 +93,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -91,7 +101,6 @@ path = "/usr/lib/init.d/29_activate_console.service" data = """ [unit] description = "Activate fallback console VT" -boot_essential = true requires_weak = [ "05_boot-essential.target", ] @@ -107,7 +116,6 @@ path = "/usr/lib/init.d/31_debug_console.service" data = """ [unit] description = "Debug console" -boot_essential = true requires_weak = [ "29_activate_console.service", ] @@ -116,4 +124,5 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ diff --git a/config/redbear-kde.toml b/config/redbear-kde.toml index b8695d1b..1a5d2dc8 100644 --- a/config/redbear-kde.toml +++ b/config/redbear-kde.toml @@ -64,6 +64,7 @@ redbear-netstat = {} redbear-traceroute = {} redbear-mtr = {} redbear-nmap = {} +cub = {} # Wayland protocol libwayland = {} @@ -271,6 +272,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -301,6 +303,7 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ [[files]] diff --git a/config/redbear-live-mini.toml b/config/redbear-live-mini.toml index 883d32d4..c60a5ade 100644 --- a/config/redbear-live-mini.toml +++ b/config/redbear-live-mini.toml @@ -75,6 +75,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -90,6 +91,7 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ [[files]] @@ -121,96 +123,6 @@ args = ["-f"] type = "oneshot_async" """ -[[files]] -path = "/etc/init.d/00_i2cd.service" -data = """ -[unit] -description = "I2C adapter registry (non-blocking on live-mini)" -requires_weak = [ - "00_base.target", -] - -[service] -cmd = "i2cd" -type = "oneshot_async" -""" - -[[files]] -path = "/etc/init.d/00_i2c-hidd.service" -data = """ -[unit] -description = "ACPI I2C HID bring-up daemon (non-blocking on live-mini)" -requires_weak = [ - "00_i2cd.service", - "00_i2c-dw-acpi.service", - "00_intel-gpiod.service", - "00_i2c-gpio-expanderd.service", -] - -[service] -cmd = "i2c-hidd" -type = "oneshot_async" -""" - -[[files]] -path = "/etc/init.d/00_i2c-gpio-expanderd.service" -data = """ -[unit] -description = "I2C GPIO expander companion bridge (non-blocking on live-mini)" -requires_weak = [ - "00_i2cd.service", - "00_gpiod.service", -] - -[service] -cmd = "i2c-gpio-expanderd" -type = "oneshot_async" -""" - -[[files]] -path = "/etc/init.d/00_ucsid.service" -data = """ -[unit] -description = "USB-C UCSI topology detector (non-blocking on live-mini)" -requires_weak = [ - "00_base.target", - "00_i2cd.service", -] - -[service] -cmd = "ucsid" -type = "oneshot_async" -""" - -[[files]] -path = "/etc/init.d/00_gpiod.service" -data = """ -[unit] -description = "GPIO controller registry (non-blocking on live-mini)" -requires_weak = [ - "00_base.target", -] - -[service] -cmd = "gpiod" -type = "oneshot_async" -""" - -[[files]] -path = "/etc/init.d/00_intel-gpiod.service" -data = """ -[unit] -description = "Intel ACPI GPIO registrar (non-blocking on live-mini)" -requires_weak = [ - "00_gpiod.service", - "00_i2cd.service", -] - -[service] -cmd = "intel-gpiod" -type = "oneshot_async" -""" - [[files]] path = "/etc/motd" data = """ @@ -248,6 +160,7 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ [[files]] @@ -265,6 +178,96 @@ args = ["-c", "echo RB_SERIAL_PROBE_OK"] type = "oneshot" """ +[[files]] +path = "/etc/init.d/00_gpiod.service" +data = """ +[unit] +description = "GPIO controller registry (non-blocking on live-mini)" +requires_weak = [ + "00_base.target", +] + +[service] +cmd = "gpiod" +type = "oneshot_async" +""" + +[[files]] +path = "/etc/init.d/00_i2cd.service" +data = """ +[unit] +description = "I2C adapter registry (non-blocking on live-mini)" +requires_weak = [ + "00_base.target", +] + +[service] +cmd = "i2cd" +type = "oneshot_async" +""" + +[[files]] +path = "/etc/init.d/00_intel-gpiod.service" +data = """ +[unit] +description = "Intel ACPI GPIO registrar (non-blocking on live-mini)" +requires_weak = [ + "00_gpiod.service", + "00_i2cd.service", +] + +[service] +cmd = "intel-gpiod" +type = "oneshot_async" +""" + +[[files]] +path = "/etc/init.d/00_i2c-gpio-expanderd.service" +data = """ +[unit] +description = "I2C GPIO expander companion bridge (non-blocking on live-mini)" +requires_weak = [ + "00_i2cd.service", + "00_gpiod.service", +] + +[service] +cmd = "i2c-gpio-expanderd" +type = "oneshot_async" +""" + +[[files]] +path = "/etc/init.d/00_i2c-hidd.service" +data = """ +[unit] +description = "ACPI I2C HID bring-up daemon (non-blocking on live-mini)" +requires_weak = [ + "00_i2cd.service", + "00_i2c-dw-acpi.service", + "00_intel-gpiod.service", + "00_i2c-gpio-expanderd.service", +] + +[service] +cmd = "i2c-hidd" +type = "oneshot_async" +""" + +[[files]] +path = "/etc/init.d/00_ucsid.service" +data = """ +[unit] +description = "USB-C UCSI topology detector (non-blocking on live-mini)" +requires_weak = [ + "00_base.target", + "00_i2cd.service", +] + +[service] +cmd = "ucsid" +type = "oneshot_async" +""" + [[files]] path = "/etc/pcid.d/ihdgd.toml" data = """ diff --git a/config/redbear-minimal.toml b/config/redbear-minimal.toml index ea283210..9c1691ac 100644 --- a/config/redbear-minimal.toml +++ b/config/redbear-minimal.toml @@ -58,10 +58,6 @@ nowait getty 2 nowait getty /scheme/debug/no-preserve -J """ -[[files]] -path = "/usr/lib/init.d/15_fatd.service" -data = "" - [[files]] path = "/usr/lib/init.d/29_activate_console.service" data = """ @@ -90,6 +86,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -105,4 +102,5 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ diff --git a/config/wayland.toml b/config/wayland.toml index 03a0edfe..a91f005e 100644 --- a/config/wayland.toml +++ b/config/wayland.toml @@ -129,6 +129,7 @@ requires_weak = [ cmd = "getty" args = ["2"] type = "oneshot_async" +respawn = true """ [[files]] @@ -159,6 +160,7 @@ requires_weak = [ cmd = "getty" args = ["/scheme/debug/no-preserve", "-J"] type = "oneshot_async" +respawn = true """ [[files]]