Add OpenWrt LXC script#1932
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
why are there changes to build.func? |
|
@CrazyWolf13 The remaining misc/build.func changes are for OpenWrt container creation support: LinuxContainers template lookup/download because OpenWrt is not in the pveam catalog, -ostype unmanaged, /bin/ash installer execution, skipping Debian/Alpine bootstrap/network waits, and LAN/WAN NIC construction. I removed the unrelated interface-package vars from global default parsing so the shared-helper diff is narrower. |
|
@CrazyWolf13 Follow-up: I pushed f85d4b2 to narrow misc/build.func further. The generic install-script URL/error-handling change and the OpenWrt USB passthrough skip are gone; the remaining helper changes are limited to OpenWrt template/container creation support. |
michelroegl-brunner
left a comment
There was a problem hiding this comment.
So that are pretty massive core changes for just one script, where we dont even know the userbase. And those are pretty confusing changes also.
For example, what is that magic number here for? elif [[ "$(stat -c%s "$TEMPLATE_PATH")" -lt 1000000 ]]
|
Addressed in 7454cc0. The PR no longer changes
The OpenWrt-specific behavior is now local to Verification run before pushing:
GitHub checks are passing on the pushed commit ( |
|
Follow-up after
|
|
Implemented in The OpenWrt LAN address remains
|
|
Runtime connectivity follow-up after
|
|
Follow-up on the Proxmox host network concern: The OpenWrt script does not change Proxmox node network settings such as interface IPs, bridge CIDRs, gateways, bridge ports, autostart, or VLAN-aware flags. It does not write /etc/network/interfaces and does not run host network mutation commands. The Proxmox-side network action is limited to the new CT config created by pct create:
The OpenWrt LAN address, for example 192.168.1.1 by default or var_lan_ipaddr if overridden, is applied inside the OpenWrt container via UCI. It is not applied to vmbr0, vmbr1, or any Proxmox host interface. I also added an explicit metadata note in 1797b35 documenting that the script does not change Proxmox host network interface, bridge CIDR, or gateway settings. |
Scripts which are clearly AI generated and not further revised by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review.
✍️ Description
Adds OpenWrt LXC support using LinuxContainers OpenWrt rootfs images.
Current PR scope is limited to the new script files:
ct/openwrt.shinstall/openwrt-install.shjson/openwrt.jsonThere are no
misc/build.funcchanges in the current PR diff. OpenWrt-specific behavior is local toct/openwrt.sh, including LinuxContainers template resolution/download, unmanagedpct create, LAN/WAN NIC setup, TUN config, and/bin/ashinstall execution.OpenWrt-specific notes:
ostype unmanagedand OpenWrtash/uciconventions.interface_portis80; setvar_interface=noto skip the web interface.eth0as192.168.1.1/24by default and WAN oneth1via DHCP; override LAN defaults withvar_lan_ipaddrandvar_lan_netmask.var_allow_same_bridge=yesonly after reviewing that topology.Validation performed:
bash /tmp/openwrt-review-regression-check.sh /tmp/opencode/ProxmoxVED-openwrt-pr1932bash -n ct/openwrt.sh install/openwrt-install.sh misc/build.funcshellcheck -e SC1090 -s bash ct/openwrt.shshellcheck -s sh install/openwrt-install.shjq . json/openwrt.json >/dev/nullGIT_MASTER=1 git diff --checkbash /tmp/openwrt-core-refactor-check.sh /tmp/opencode/ProxmoxVED-openwrt-pr1932bash /tmp/openwrt-surface-qa.sh /tmp/opencode/ProxmoxVED-openwrt-pr1932OPENWRT_LAN_IPADDR/OPENWRT_LAN_NETMASKvalues are applied through UCI.Runtime limitations in this environment:
pct/pvesmexecution was not performed.🔗 Related PR / Issue
Link: #
✅ Prerequisites (X in brackets)
🏗️ arm64 Support (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
Code_Audit.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)📦 Application Requirements (for new scripts)
🌐 Source