diff --git a/vz/dists/scripts/functions b/vz/dists/scripts/functions index b067ec2..459fc30 100755 --- a/vz/dists/scripts/functions +++ b/vz/dists/scripts/functions @@ -275,7 +275,7 @@ change_hostname() BEGIN {found = 0; skip = 0} $0 == comm {found = 1; next} found { - if (ip == "") {ip = $1} + if (ip == "" && ! $1 ~ "^#") {ip = $1} next; } !found && $2 == host {skip = 1} @@ -288,6 +288,7 @@ change_hostname() if (skip) exit 0; if (ip == "") { ip = "127.0.0.1" } print comm; + print "# ALL CHANGES BELOW THIS LINE WILL BE LOST"; alias="" if ((i=index(host, ".")) > 1) { alias=substr(host, 1, i - 1);