William C Bonner a �crit :
Is there an easy way of auto generating a hostname at boot time?
Is there a way of having a hostname auto generted at boot time, possibly
based on an available network address.e.g.
hostname not on the network: beagleboard
hostname on the network: beagleboard-00259C642A2CGetting the hostname suffix from the ethernet0 HWaddr.
Try :
ethaddr=`cat /sys/class/net/eth0/address | sed s/\://g`
hostname="beagleboard-$ethaddr"
Of course you need to have sysfs mounted before doing this.
Regards,