mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 19:32:17 +00:00
Add IS_WSL2 export to runtime.sh and replace all inline grep-based WSL2 guards in administration scripts with a source + variable check for consistency. Affected scripts: - scripts/administration/systemd/enable/wsl2.sh - scripts/administration/tls/trust/wsl2.sh - scripts/administration/network/dns/setup/wsl.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ systemd — Enable
This directory contains platform-specific scripts for enabling systemd in environments where it is not active by default.
📄 Scripts
🪟 wsl2.sh
Enables systemd as the WSL2 init system by writing systemd=true into /etc/wsl.conf.
- Silently exits if not running on WSL2
- Silently exits if systemd is already running (
/run/systemd/systemexists) - If systemd is configured but not yet active, prints instructions to restart WSL2
- If systemd is not configured at all, appends the
[boot]section to/etc/wsl.confand triggerswsl --shutdownto apply the change
⚠️ After this script runs, WSL2 must be fully restarted before systemd-dependent steps (DNS, AppArmor, etc.) will work.
🔗 Related
../— systemd administration scriptsmake wsl2-systemd-check— Make target that invokes this script