Enhance cloud-init scripts and dashboard for improved USB boot functionality</message>

<message>Update the bootstrap script to ensure hostname resolution by adding entries to /etc/hosts, preventing "sudo: unable to resolve host" errors. Modify user-data.bootstrap to include the same hostname resolution logic. Revise dashboard templates to reflect the new project name "GNSS Guard Provisioning" and improve user interface elements related to USB boot operations, including clearer instructions and status messages. These changes enhance the overall user experience and streamline the provisioning process.
This commit is contained in:
nearxos
2026-02-24 08:50:32 +02:00
parent 59f8ebe61d
commit 1501c17ab9
11 changed files with 111 additions and 40 deletions

View File

@@ -1,4 +1,9 @@
#!/bin/bash
# Minimal bootstrap script for cloud-init first boot (test).
set -e
# Ensure hostname resolves (avoids "sudo: unable to resolve host")
H="$(hostname)"
grep -q "127.0.1.1.*$H" /etc/hosts || echo "127.0.1.1 $H" >> /etc/hosts
echo "[$(date -Iseconds)] test completed" | tee -a /var/log/cloud-init-bootstrap.log

View File

@@ -20,6 +20,10 @@ write_files:
PermitRootLogin no
runcmd:
# Ensure hostname resolves (avoids "sudo: unable to resolve host" when meta-data sets hostname)
- |
H="$(hostname)"
grep -q "127.0.1.1.*$H" /etc/hosts || echo "127.0.1.1 $H" >> /etc/hosts
- systemctl enable ssh
- systemctl start ssh
# Download and run bootstrap script (edit URL to match your file server)