/etc/hostid is a binary file
This commit is contained in:
parent
7ebf94cc23
commit
0c627bdc66
1 changed files with 1 additions and 1 deletions
|
|
@ -4,5 +4,5 @@
|
||||||
# Initialize /etc/hostid if it doesn't exist or is empty
|
# Initialize /etc/hostid if it doesn't exist or is empty
|
||||||
#
|
#
|
||||||
if [ ! -f /etc/hostid -o "$(cat /etc/hostid 2>/dev/null)" = "" ]; then
|
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
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue