Add console setup helper#1712
Merged
Merged
Conversation
af784a3 to
f3a6e02
Compare
Add a whiptail-based /usr/sbin/setup helper for first-console\nconfiguration of keymap, LAN, and WAN settings. The helper\nreuses the local rpcd handlers, preserves existing interface names,\nand avoids rewriting unchanged network configuration. Assisted-by: OpenCode:openai/gpt-5.4
f3a6e02 to
1a11fba
Compare
Support LAN DHCP, expose logical LAN/WAN interface selection, guide WAN static configuration, and strengthen IPv4/CIDR validation in the console setup helper. Keep keymap changes immediate and avoid rewriting unchanged network state during no-op applies. Assisted-by: OpenCode:openai/gpt-5.4
Changes: - confirm exit when there are unsaved network changes - validate IP/CIDR input immediately on entry, re-prompt on error - split network menu into interface selection and configuration pages - move apply changes item under network menu - improve labels - rename Cancel buttons to Back in sub-menus and Exit in main menu Assisted-by: Copilot/Various models
1a11fba to
b035db2
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new console-first configuration helper (/usr/sbin/setup) to guide initial device setup (keymap + basic LAN/WAN configuration) using a whiptail UI, and wires it into the image via the ns-api package and documentation.
Changes:
- Add
whiptaildependency and install a new/usr/sbin/setuphelper vians-api. - Implement a
whiptail-driven setup flow that reads current config vians.devices/UCI and applies updates vians.devices+ns.commit. - Document the new console setup helper in the quickstart guide.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| packages/ns-api/Makefile | Adds whiptail dependency and installs the new /usr/sbin/setup script. |
| packages/ns-api/files/setup | New interactive console setup script for keymap + LAN/WAN configuration via RPCD/UCI. |
| docs/quickstart.md | Documents the availability and scope of /usr/sbin/setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Related issueCreated #1735 (Feature: Console setup helper for initial configuration) to track this work. Test cases have been prepared in the issue; they should be executed before merging this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
whiptail-based/usr/sbin/setuphelper for first-consoleconfiguration of keymap, LAN, and WAN settings.
Related issue
Closes #1735 (Feature: Console setup helper for initial configuration)
How to test
/usr/sbin/setupon the local console.itandusand confirm it is appliedimmediately.
interface name is preserved.
dhcporstaticand confirm only the changed sideis rewritten.
Applywithout changes and confirm no network config is touched.Dependencies
None.