#!/bin/sh # # Initialize /etc/hostid if it doesn't exist or is empty # if [ ! -f /etc/hostid -o "$(cat /etc/hostid 2>/dev/null)" = "" ]; then dd if=/dev/urandom bs=4 count=1 of=/etc/hostid fi