mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	adjust_apache.pl: fixes printing more than one copy of the current management hostname
This was happening when a unit was getting moved between networks and a totally different IP was found for it Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
		| @@ -340,7 +340,9 @@ if (-f "$fname") { | |||||||
|         print "old[$ln]\n" if ($debug); |         print "old[$ln]\n" if ($debug); | ||||||
|         # if we are comments or blank lines, preserve them |         # if we are comments or blank lines, preserve them | ||||||
|         next if ($ln =~ /LF-HOSTNAME-NEXT/); |         next if ($ln =~ /LF-HOSTNAME-NEXT/); | ||||||
|         next if ($ln =~ /^$host_map{$MgrHostname}\s+/); |         next if ($ln =~ /\b$MgrHostname\b/); # skip our mgt hostname | ||||||
|  |         next if ($ln =~ /^$host_map{$MgrHostname}\s+/); # line starts with present IP addr | ||||||
|  |  | ||||||
|         if (($ln =~ /^\s*$/) || ($ln =~ /^\s*#/)) { |         if (($ln =~ /^\s*$/) || ($ln =~ /^\s*#/)) { | ||||||
|             push(@newlines, $ln); |             push(@newlines, $ln); | ||||||
|             next; |             next; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jed Reynolds
					Jed Reynolds