Skip to content

Commit 5b9e19d

Browse files
feat: add console setup helper
Add a whiptail-based /usr/sbin/setup helper for first-console configuration of keymap, LAN, and WAN settings. The helper reuses the local rpcd handlers, preserves existing interface names, and avoids rewriting unchanged network configuration. Assisted-by: OpenCode:openai/gpt-5.4
1 parent 67d7dc9 commit 5b9e19d

3 files changed

Lines changed: 1174 additions & 0 deletions

File tree

docs/quickstart.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ See the [install page]({{site.manual_url}}/install.html) inside manual.
3131

3232
See the [access page]({{site.manual_url}}/remote_access.html) inside manual.
3333

34+
## Console setup
35+
36+
The image ships the `/usr/sbin/setup` helper for basic console-first
37+
configuration.
38+
39+
The command uses a `whiptail` interface to:
40+
41+
- switch the console keyboard between `it` and the default `us`
42+
- assign physical network cards to `lan` and `wan`
43+
- configure `lan` IPv4/CIDR
44+
- configure `wan` as `dhcp` or `static`
45+
3446
### LuCI
3547

3648
The following sections/options should not be changed from the web interface:

packages/ns-api/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ define Package/ns-api
3131
+python3-requests \
3232
+python3-semver \
3333
+python3-urllib \
34+
+whiptail \
3435
+sshpass \
3536
+wireguard-tools
3637
EXTRA_DEPENDS:=adblock (>=4.5.3)
@@ -183,6 +184,7 @@ define Package/ns-api/install
183184
$(INSTALL_CONF) files/nat-helpers.keep $(1)/lib/upgrade/keep.d/nat-helpers
184185
$(LN) /usr/bin/msmtp $(1)/usr/sbin/sendmail
185186
$(INSTALL_BIN) ./files/load-kernel-modules $(1)/usr/sbin/load-kernel-modules
187+
$(INSTALL_BIN) ./files/setup $(1)/usr/sbin/setup
186188
$(INSTALL_BIN) ./files/firewall-apply-default-logging $(1)/usr/sbin/firewall-apply-default-logging
187189
$(INSTALL_DIR) $(1)/etc/config
188190
$(INSTALL_CONF) ./files/config/ns-api $(1)/etc/config/ns-api

0 commit comments

Comments
 (0)