Init script: don't panic if DHCP server didn't give a host name

11 views
Skip to first unread message

Anthony Takata

unread,
Dec 14, 2014, 1:41:47 AM12/14/14
to tcos-u...@googlegroups.com
I adjusted 05network to allow boot to continue if no server name is given by DHCP server:


if [ -z $hostname ] || [ "x{$hostname}" = "x " ]; then
  log_begin_msg "ERROR: DHCP server didn't give me a hostname !!! Edit /etc/hosts in dhcp server for something not random."
  hostname="tcos_"
  hostname="${hostname}`hexdump -n 2 -e '/2 "%u"' /dev/urandom`"
fi


It is possible to adapt more of TCOS to give back this auto-generated host name to TCOSmonitor.
This will auto-generate a host name of tcos_$random, so that the generation of the Xorg cookie won't fail and break everything.
Reply all
Reply to author
Forward
0 new messages