Comment 66 for bug 1452202

Revision history for this message
Hua Zhang (zhhuabj) wrote :

I think Peter Wu is totally right.

In addition to above two problems, there is still another problem with the patch that the present regular expression '/bin/sed -i "s/$CURRENT_HOSTNAME/$NETCFG_HOSTNAME/" /etc/hosts' can't handle multiple hostname case:

$ echo '127.0.1.1 ubuntu.me.com ubuntu' |sed "s/ubuntu/newnode/"
127.0.1.1 newnode.me.com ubuntu

$ echo '127.0.1.1 ubuntu.me.com ubuntu' |sed "s/ubuntu/newnode/g"
127.0.1.1 newnode.me.com newnode