Skip to content

Commit c43a78a

Browse files
freebsd/netbsd: set and display full hostname
1 parent 4525e8d commit c43a78a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ jobs:
310310
set -euxo pipefail
311311
case "${{ matrix.os }}" in
312312
freebsd)
313+
# Ensure a proper hostname/FQDN is set (VMs may not have one by default)
314+
sudo -E /bin/sh -c 'grep -q "freebsd\.local" /etc/hosts || echo "127.0.0.1 freebsd.local freebsd" >> /etc/hosts'
315+
sudo -E hostname freebsd.local
316+
hostname
313317
export IGNORE_OSVERSION=yes
314318
sudo -E pkg update -f
315319
sudo -E pkg install -y xxhash liblz4 zstd pkgconf
@@ -354,6 +358,10 @@ jobs:
354358
fi
355359
;;
356360
netbsd)
361+
# Ensure a proper hostname/FQDN is set (VMs may not have one by default)
362+
sudo -E /bin/sh -c 'grep -q "netbsd\.local" /etc/hosts || echo "127.0.0.1 netbsd.local netbsd" >> /etc/hosts'
363+
sudo -E hostname netbsd.local
364+
hostname
357365
arch="$(uname -m)"
358366
sudo -E mkdir -p /usr/pkg/etc/pkgin
359367
echo "http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/${arch}/10.1/All" | sudo tee /usr/pkg/etc/pkgin/repositories.conf > /dev/null

0 commit comments

Comments
 (0)