The following regex is more better
/bin/sed -i
"/^[127|localhost]/s/${CURRENT_HOSTNAME}/${NETCFG_HOSTNAME}/g"
/etc/hosts
--
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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs