CVS commit: src/distrib/utils/embedded/files

"Jan Schaumann" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	jschauma
Date:		Sat May 16 21:00:00 UTC 2026

Modified Files:
	src/distrib/utils/embedded/files: ec2_init

Log Message:
Improve metadata fetching to work more reliably across
IPv4-only, IPv6-only, and dual-stack instances.

AWS does not by default enable the metadata service on
IPv6; you have to specify '--metadata-options "HttpProtocolIpv6=enabled"'.
Without this, even a dual-stack instance can't fetch
metadata from the IPv6 endpoint.

In addition, reaching the metadata service takes some
time, so we can't trivially check for network
readiness and instead need to actually try to fetch a
file.  Ok.

While here, don't overwrite a hostname that is set
from /etc/rc.conf and only set the hostname if
otherwise unset.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/embedded/files/ec2_init

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.