View | Details | Raw Unified | Return to bug 15073
Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +5 lines)
Line  Link Here
0
-- a/vz/dists/scripts/functions
0
++ b/vz/dists/scripts/functions
Lines 272-286 change_hostname() Link Here
272
	${CP} "$cfg" "$cfg.$$" ||
272
	${CP} "$cfg" "$cfg.$$" ||
273
		error "Can't copy file ${cfg}" $VZ_FS_NO_DISK_SPACE
273
		error "Can't copy file ${cfg}" $VZ_FS_NO_DISK_SPACE
274
	awk -v ip="$ip" -v host="$host" -v comm="$comm" '
274
	awk -v ip="$ip" -v host="$host" -v comm="$comm" '
275
		BEGIN {found = 0; skip = 0}
275
		BEGIN {found = 0; skip = 0; lcl=0}
276
		$0 == comm {found = 1; next}
276
		$0 == comm {found = 1; next}
277
		found {
277
		found {
278
			if (ip == "") {ip = $1}
278
			if (ip == "") {ip = $1}
279
			next;
279
			next;
280
		}
280
		}
281
		!found && $2 == host {skip = 1}
281
		$2 == host {skip = 1}
282
		$1 == "127.0.0.1" {
282
		!lcl && $1 == "127.0.0.1" {
283
			print "127.0.0.1	localhost.localdomain localhost";
283
			print "127.0.0.1	localhost.localdomain localhost";
284
			lcl = 1;
284
			next;
285
			next;
285
		}
286
		}
286
		{print}
287
		{print}

Return to bug 15073