I don't think I'd want to have the patches provided applied as-is. There
are multiple problems with them:

- The default hostname is 'ubuntu', and is the value you will get if
nothing is preseeded -- we *do* need to skip it in this case, although
the grep may need to be more precise. A name like 'ubuntuxenial' should
match this grep.

- The sed needs to be fixed to more appropriately catch for the exact
string, rather than any substring -- ie. it should not match
'ipv6-allnodes' if the name received from DHCP was 'node'. It should
only match and replace for 'node'.

- You do not want to replace for all of 127 in /etc/hosts: you should
not replace 127.0.0.1, but instead only "add" (replace, if necessary)
127.0.1.1; so maybe simply replace that entire line (to account for the
case where multiple hostnames are set).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1452202

Title:
  ubuntu preseed install fails to set a hostname

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1452202/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to