2026-04-14 18:08:59 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Regenerates /etc/issue so the live-ISO console tells the user which URL
|
|
|
|
|
# to open in their browser. Shows proksi.local (via avahi/mDNS) as the
|
|
|
|
|
# preferred URL and the raw IP as a fallback for networks where mDNS
|
2026-08-25 15:18:39 +02:00
|
|
|
# doesn't work.
|
|
|
|
|
#
|
|
|
|
|
# Runs at boot and then every few seconds from furtka-issue.timer, so the
|
|
|
|
|
# fallback line is *always* on screen: with the address once DHCP has
|
|
|
|
|
# handed one out, or with a "no IP yet" hint before that / when the cable
|
|
|
|
|
# is unplugged. Only rewrites + nudges agetty when the text actually
|
|
|
|
|
# changed, so the login prompt doesn't flicker on every tick.
|
|
|
|
|
set -u
|
2026-04-14 18:08:59 +02:00
|
|
|
|
2026-08-25 15:18:39 +02:00
|
|
|
issue=/etc/issue
|
2026-04-14 18:08:59 +02:00
|
|
|
|
2026-08-25 15:18:39 +02:00
|
|
|
mapfile -t ips < <(ip -4 -o addr show scope global 2>/dev/null | awk '{print $4}' | cut -d/ -f1)
|
|
|
|
|
|
|
|
|
|
new=$(
|
2026-04-14 18:08:59 +02:00
|
|
|
echo
|
|
|
|
|
echo " Open Furtka in a browser on another device on your network:"
|
|
|
|
|
echo
|
|
|
|
|
echo " http://proksi.local:5000 (easy — try this first)"
|
2026-08-25 15:18:39 +02:00
|
|
|
if ((${#ips[@]})); then
|
|
|
|
|
for ip in "${ips[@]}"; do
|
|
|
|
|
echo " http://${ip}:5000 (fallback if the first doesn't work)"
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
echo " (fallback: no IP address yet — waiting for the network."
|
|
|
|
|
echo " Check the cable / DHCP. This line updates by itself.)"
|
2026-04-14 18:08:59 +02:00
|
|
|
fi
|
|
|
|
|
echo
|
|
|
|
|
echo " Then follow the wizard to install Furtka on this machine."
|
feat(installer): friendlier wizard, retry after a failed install, no boot stall on multi-NIC boards
- error state gets a 'Try again' button (settings are kept) plus links back
to the disk / settings pages; the page reloads into it instead of only
recolouring the bar
- names are lowercased instead of rejected; system account names (root,
caddy, docker, …) are refused with a clear message
- plain wording: 'Server name' with a live http://<name>.local preview,
'Pick a disk' with an explicit erase warning, a readable confirm table
(language label, disk size/type) and a Back button
- the password hint says it is also the SSH / console password; the
language hint says the wizard itself is English
- wizard pages redirect to the progress page while an install is running
- progress page: aria-live phase, aria-valuenow updates, 'lost connection'
note, 'fine to close this page'
- .local fallback on the reboot page: router device list, IP may change
- live console banner says a network cable with internet is required
- target gets a systemd-networkd-wait-online --any drop-in: boards with a
second unplugged NIC (or Ethernet + Wi-Fi) waited up to 2 min at boot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wq1hzUp4ZmCKHDuLKCnu73
2026-09-28 13:21:55 +02:00
|
|
|
echo " The install downloads packages, so this machine needs a network"
|
|
|
|
|
echo " cable with internet access. Wi-Fi is not set up automatically."
|
2026-04-14 18:08:59 +02:00
|
|
|
echo
|
2026-08-25 15:18:39 +02:00
|
|
|
echo " Need a shell? Log in as root (no password)."
|
|
|
|
|
echo
|
|
|
|
|
)
|
2026-04-14 18:08:59 +02:00
|
|
|
|
2026-08-25 15:18:39 +02:00
|
|
|
if [ "$new" != "$(cat "$issue" 2>/dev/null)" ]; then
|
|
|
|
|
printf '%s\n' "$new" > "$issue"
|
|
|
|
|
agetty --reload 2>/dev/null || true
|
|
|
|
|
fi
|