Enhance provisioning documentation and scripts for improved network boot and DNS management</message>
<message>Add new documentation files for device DNS management via DHCP and dnsmasq configuration. Update cloud-init scripts to ensure proper handling of /etc/resolv.conf and DNS settings, allowing for seamless integration with file.server. Modify existing scripts to support dynamic LAN subnet configuration and improve overall network boot functionality. These changes enhance user experience and streamline the setup process for the CM4 eMMC provisioning service.
This commit is contained in:
@@ -10,10 +10,15 @@
|
||||
# as first-boot.conf; then add a runcmd line to download it to /tmp/first-boot.conf before
|
||||
# running first-boot.sh so the script loads your config.
|
||||
# 4. To use a different username than "pi", set PI_USER in first-boot.conf and create that user below.
|
||||
# 5. DNS: manage_resolv_conf: false and NM rc-manager=symlink so the device uses DNS from DHCP
|
||||
# (LXC option 6) and file.server resolves. See docs/DEVICE-DNS-DHCP-RESOLVCONF.md.
|
||||
|
||||
package_update: true
|
||||
package_upgrade: false
|
||||
|
||||
# Do not overwrite /etc/resolv.conf; device will use DNS from DHCP (LXC sends option 6).
|
||||
manage_resolv_conf: false
|
||||
|
||||
packages:
|
||||
- curl
|
||||
|
||||
@@ -30,7 +35,17 @@ write_files:
|
||||
PasswordAuthentication yes
|
||||
PermitRootLogin no
|
||||
|
||||
# NetworkManager: manage resolv.conf via symlink so it gets DNS from DHCP (option 6 from LXC).
|
||||
- path: /etc/NetworkManager/conf.d/99-resolv-dhcp.conf
|
||||
content: |
|
||||
[main]
|
||||
rc-manager=symlink
|
||||
permissions: '0644'
|
||||
|
||||
runcmd:
|
||||
# Allow NM to manage resolv.conf with DHCP DNS (remove static file if present).
|
||||
- rm -f /etc/resolv.conf
|
||||
- systemctl restart NetworkManager || true
|
||||
- systemctl enable ssh
|
||||
- systemctl start ssh
|
||||
- curl -fsSL "http://10.20.50.1:5000/files/first-boot.sh" -o /tmp/first-boot.sh
|
||||
|
||||
Reference in New Issue
Block a user