/etc/hostid is a binary file

This commit is contained in:
Stefan Bethke 2026-03-31 19:59:47 +02:00
commit 0c627bdc66

View file

@ -4,5 +4,5 @@
# Initialize /etc/hostid if it doesn't exist or is empty
#
if [ ! -f /etc/hostid -o "$(cat /etc/hostid 2>/dev/null)" = "" ]; then
hexdump -n 4 -e '"%02x"' /dev/urandom >/etc/hostid
dd if=/dev/urandom bs=4 count=1 of=/etc/hostid
fi