mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-28 17:32:35 +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);
|
||||
# if we are comments or blank lines, preserve them
|
||||
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*#/)) {
|
||||
push(@newlines, $ln);
|
||||
next;
|
||||
|
||||
Reference in New Issue
Block a user