Ports the community s6/s6-rc service catalog (early-boot mounts, udev,
dbus, session/power, networking, display managers, peripheral daemons)
to Lua-based service definitions.
- src/lua/s6lua.lua: shared helper library (exec, logging, fstab
parsing, oneshot shell runner, readiness notification)
- src/native/s6exec.c: minimal execvp() binding so longrun `run`
scripts can replace their own process image with the real daemon,
since stock Lua has no exec() and os.execute("exec ...") does not
solve it (the interpreter stays alive as an unsupervised parent)
- tools/catalog.lua + gen-services.lua: table-driven generator for
the structurally identical -srv/-log daemon pairs and agetty ttys
- tools/lint.lua, check-syntax.ps1, set-exec-bits.ps1: local
verification (no live s6/Linux target available this session)
- services/: 50 service directories (14 early-boot oneshots, 12
daemon srv/log pairs, 6 agetty ttys, boot/mount/setup/ttys/
graphical/default bundles)
Authored and syntax/structurally validated only. Native module is
unbuilt and daemon flags are unverified against Artix's real catalog
(gitea was unreachable during research) -- see docs/CONVENTIONS.md.
23 lines
847 B
PowerShell
23 lines
847 B
PowerShell
# Git tracks the executable bit in the tree object mode (100755 vs 100644)
|
|
# independent of the filesystem, but a Windows checkout won't set it for
|
|
# you on `git add`. Without this, s6-supervise fails to exec these scripts
|
|
# on the real target, and nothing in the syntax/lint checks would catch it.
|
|
param()
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $repoRoot
|
|
|
|
$scriptNames = @('run', 'up', 'down', 'finish', 'reload', 'check')
|
|
|
|
$files = Get-ChildItem -Path (Join-Path $repoRoot 'services') -Recurse -File |
|
|
Where-Object { $scriptNames -contains $_.Name }
|
|
|
|
foreach ($f in $files) {
|
|
$relPath = (Resolve-Path -Relative $f.FullName) -replace '\\', '/'
|
|
git add -- $relPath | Out-Null
|
|
git update-index --chmod=+x -- $relPath
|
|
}
|
|
|
|
Write-Host "Set executable bit on $($files.Count) file(s)."
|