freebsd/netbsd: set and display full hostname

This commit is contained in:
Thomas Waldmann 2025-11-29 13:08:19 +01:00
parent 4525e8dfe6
commit c43a78accf
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -310,6 +310,10 @@ jobs:
set -euxo pipefail
case "${{ matrix.os }}" in
freebsd)
# Ensure a proper hostname/FQDN is set (VMs may not have one by default)
sudo -E /bin/sh -c 'grep -q "freebsd\.local" /etc/hosts || echo "127.0.0.1 freebsd.local freebsd" >> /etc/hosts'
sudo -E hostname freebsd.local
hostname
export IGNORE_OSVERSION=yes
sudo -E pkg update -f
sudo -E pkg install -y xxhash liblz4 zstd pkgconf
@ -354,6 +358,10 @@ jobs:
fi
;;
netbsd)
# Ensure a proper hostname/FQDN is set (VMs may not have one by default)
sudo -E /bin/sh -c 'grep -q "netbsd\.local" /etc/hosts || echo "127.0.0.1 netbsd.local netbsd" >> /etc/hosts'
sudo -E hostname netbsd.local
hostname
arch="$(uname -m)"
sudo -E mkdir -p /usr/pkg/etc/pkgin
echo "http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/${arch}/10.1/All" | sudo tee /usr/pkg/etc/pkgin/repositories.conf > /dev/null