From 294c0064de938f0c13e965d2f0e3ef99964e156e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 19 Feb 2026 19:36:24 +0100 Subject: [PATCH] Change a couple of init scripts to shell scripts The cd command in init scripts manipulates global state, support for which we may remove in the future. --- config/acid.toml | 9 ++++++++- config/auto-test.toml | 9 ++++++++- config/redoxer.toml | 26 ++++++++++++++------------ 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/config/acid.toml b/config/acid.toml index 329d5be9b..3344c2285 100644 --- a/config/acid.toml +++ b/config/acid.toml @@ -16,7 +16,14 @@ ion = {} [[files]] path = "/usr/lib/init.d/10_acid" data = """ -export RUST_BACKTRACE full +ion /usr/lib/run_acid.ion +""" + +[[files]] +path = "/usr/lib/run_acid.ion" +data = """ +#!/usr/bin/env ion +export RUST_BACKTRACE=full cd /home/user/acid cargo test shutdown diff --git a/config/auto-test.toml b/config/auto-test.toml index 9f350f6fb..69cb87bcb 100644 --- a/config/auto-test.toml +++ b/config/auto-test.toml @@ -18,7 +18,14 @@ relibc-tests-bins = {} [[files]] path = "/usr/lib/init.d/30_console" data = """ -export RUST_BACKTRACE full +ion /usr/lib/run_tests.ion +""" + +[[files]] +path = "/usr/lib/run_tests.ion" +data = """ +#!/usr/bin/env ion +export RUST_BACKTRACE=full cd /home/user/acid cargo test bash /root/relibc-tests/run.sh diff --git a/config/redoxer.toml b/config/redoxer.toml index 54e1e2ff1..872c22f86 100644 --- a/config/redoxer.toml +++ b/config/redoxer.toml @@ -25,23 +25,25 @@ dhcpd """ [[files]] -path = "/usr/lib/init.d/20_env" +path = "/usr/lib/init.d/30_redoxer" data = """ -echo -echo ## preparing environment ## -export GROUPS 0 -export HOME /root -export HOST redox -export SHELL /bin/sh -export UID 0 -export USER root -cd /root -env +ion /usr/lib/run_redoxer.ion """ [[files]] -path = "/usr/lib/init.d/30_redoxer" +path = "/usr/lib/run_redoxer.ion" data = """ +#!/usr/bin/env ion +echo +echo ## preparing environment ## +export GROUPS=0 +export HOME=/root +export HOST=redox +export SHELL=/bin/sh +export UID=0 +export USER=root +cd /root +env echo echo ## running redoxer ## redoxerd