-x was never declared in getopts, so !$opt_x was always true and the
block it guards always ran. It now exists and covers both network steps.
apt-get update ran after the installs; on an image with empty package
lists every install failed. It now runs first.
apt-get upgrade had no -y and stopped an unattended run at the prompt.
DEBIAN_FRONTEND=noninteractive for the same reason.
On 13 the timesyncd.conf was copied but the service never restarted, so
it took effect at the next reboot at the earliest - and the ntp package
from the install list competed with timesyncd for port 123. ntp is now
installed only on the older releases, where the service is called ntpsec
since 12.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>