Launch /bin/sh as interactive login shell from init#918
Conversation
After the existing hello smoke tests complete, init now launches /bin/sh with a proper argv (["sh"]) and environment (HOME, PATH, TERM, PS1). If the shell exits (user types `exit`), init respawns it so the system stays usable. Closes #900 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe init binary's /bin/sh launcher is reworked from a one-shot smoke test into a respawn loop that continuously launches an interactive shell with proper environment variables (HOME, PATH, TERM, PS1) and diagnostic logging. The test fixture hash is updated to reflect the changed init binary. ChangesInit Shell Respawn Loop
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The init binary changed (added argv/envp to execve), which changes the deterministic ext2 rootfs image hash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closes #900
Summary
/bin/shas an interactive login shell with a proper argv (["sh"]) and environment (HOME=/,PATH=/bin:/usr/bin,TERM=vt100,PS1=vibix$).exit), init respawns it so the system stays usable.init: launching /bin/shsmoke marker (already inSMOKE_MARKERS) fires before each launch attempt.Test plan
cargo xtask buildpassescargo fmt --all -- --checkpassescargo xtask smoke— smoke test environment has no KVM; CI will validate all markers includinginit: launching /bin/sh