Remove all usage of env var export in init scripts

This commit is contained in:
bjorn3 2026-02-19 21:51:38 +01:00
parent 7c374fde85
commit 57708a0a5e
9 changed files with 32 additions and 39 deletions

View File

@ -35,7 +35,7 @@ nowait sudo --daemon
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = """
pcid-spawner /etc/pcid.d/
pcid-spawner
"""
[[files]]

View File

@ -19,9 +19,7 @@ orbutils-orblogin = {}
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
export VT 3
nowait orbital orblogin launcher
unset VT
nowait VT=3 orbital orblogin launcher
"""
# Override console config to not switch to VT 2

View File

@ -30,11 +30,7 @@ shared-mime-info = {}
path = "/usr/lib/init.d/20_orbital"
data = """
notify audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orblogin launcher
unset BROWSER
unset VT
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orblogin launcher
"""
# Override console config to not switch to VT 2

View File

@ -16,7 +16,6 @@ os-test-bins = {} # Provides source and cross-compiled binaries
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
export RUST_BACKTRACE full
os-test-runner
RUST_BACKTRACE=full os-test-runner
shutdown
"""

View File

@ -13,7 +13,5 @@ path = "/usr/lib/init.d/30_redoxer"
data = """
echo
echo ## running redoxer in orbital ##
export VT 3
nowait orbital redoxerd
unset VT
nowait VT=3 orbital redoxerd
"""

View File

@ -27,7 +27,6 @@ xkeyboard-config = {}
[[files]]
path = "/usr/lib/init.d/10_wayland_env"
data = """
export XDG_RUNTIME_DIR /tmp/run/user/0
#TODO: mkdir -p not working
mkdir -p /tmp/run
mkdir -p /tmp/run/user
@ -40,11 +39,7 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/
path = "/usr/lib/init.d/20_orbital"
data = """
notify audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orbital-wayland
unset BROWSER
unset VT
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-wayland
"""
[[files]]
@ -53,6 +48,8 @@ mode = 0o755
data = """
#!/usr/bin/env bash
export XDG_RUNTIME_DIR /tmp/run/user/0
unset DISPLAY
export COSMIC_BACKEND=winit
export LD_DEBUG=all

View File

@ -25,6 +25,14 @@ zenity = {}
[[files]]
path = "/usr/lib/init.d/10_dbus"
data = """
bash /usr/bin/start-dbus.sh
"""
[[files]]
path = "/usr/bin/start-dbus.sh"
mode = 0o755
data = """
#!/usr/bin/env bash
export DBUS_DEBUG_OUTPUT=1
#export DBUS_VERBOSE=1
#export G_DBUS_DEBUG=all
@ -38,7 +46,6 @@ dbus-daemon --system
[[files]]
path = "/usr/lib/init.d/10_xenv"
data = """
export DISPLAY :0
glib-compile-schemas /usr/share/glib-2.0/schemas/
"""
@ -47,11 +54,7 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/
path = "/usr/lib/init.d/20_orbital"
data = """
notify audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orbital-x11
unset BROWSER
unset VT
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-x11
"""
[[files]]
@ -112,6 +115,16 @@ sleep 1
mate-session&
"""
# Override console config to set DISPLAY=:0
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
nowait DISPLAY=:0 getty 2
nowait DISPLAY=:0 getty /scheme/debug/no-preserve -J
"""
[[files]]
path = "/usr/bin/browser"
mode = 0o755

View File

@ -18,9 +18,7 @@ include = ["../desktop.toml"]
path = "/usr/lib/init.d/20_orbital"
data = """
notify audiod
export VT 3
nowait orbital contain_orblogin launcher
unset VT
nowait VT=3 orbital contain_orblogin launcher
"""
# Override console init to use contain

View File

@ -35,13 +35,6 @@ htop = {}
website = {}
[[files]]
# Undocumented usage of rsdctl, pointing to notifications dir
path = "/usr/lib/init.d/19_rustyd"
data = """
export RSDCTL_ADDR /var/run/rustysd/control.socket
"""
[[files]]
path = "/usr/lib/init.d/98_keygen_sh"
data = """
@ -51,7 +44,8 @@ bash /root/keygen.sh
[[files]]
path = "/usr/lib/init.d/99_rustysd"
data = """
rustysd --conf /etc/rustysd
# Undocumented usage of rsdctl, pointing to notifications dir
RSDCTL_ADDR=/var/run/rustysd/control.socket rustysd --conf /etc/rustysd
"""
[[files]]
@ -307,9 +301,9 @@ data = """
# > sudo bash server.sh
#
# The server will start port 22 (ssh), 80 (static web) and 8081 (php)
# If you use the Redox OS build system, starting QEMU with `net=redir`
# If you use the Redox OS build system, starting QEMU with `net=redir`
# should expose those port to 8022, 8080 and 8081.
# Try logging in to console via SSH with `ssh user@localhost -p 8022`
#
#
##############################################################################
"""