Comment 93 for bug 1452202

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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).