interfaces: remove decriptive name from logging; loosely closes #6740

This commit is contained in:
Franco Fichtner 2023-08-16 09:13:37 +02:00
parent 32a6a11e6c
commit 608ee32f25
2 changed files with 6 additions and 10 deletions

View File

@ -61,7 +61,6 @@ if (!isset($config['interfaces'][$interface]['enable'])) {
/* this may be required to cleanse the DNS information no longer available */
system_resolver_configure();
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);
list ($ip) = interfaces_primary_address($interface);
if (!is_ipaddr($ip)) {
@ -71,7 +70,7 @@ if (!is_ipaddr($ip)) {
* mode and not have an IP address.
*/
if (substr($device, 0, 4) != 'ovpn') {
log_msg("Failed to detect IP for {$interface_descr}[{$interface}]", LOG_INFO);
log_msg("Failed to detect IP for interface {$interface}", LOG_INFO);
return;
}
@ -83,11 +82,11 @@ $cacheip_file = "/tmp/{$device}_oldip";
$cacheip = trim(@file_get_contents($cacheip_file));
if ($force == 'no' && $ip == $cacheip) {
log_msg("No IP change detected (current: {$ip}, interface: {$interface_descr}[{$interface}])", LOG_INFO);
log_msg("No IP change detected (current: {$ip}, interface: {$interface})", LOG_INFO);
return;
}
log_msg("IP renewal starting (new: {$ip}, old: {$cacheip}, interface: {$interface_descr}[{$interface}], device: {$device}, force: {$force})");
log_msg("IP renewal starting (new: {$ip}, old: {$cacheip}, interface: {$interface}, device: {$device}, force: {$force})");
interfaces_vips_configure($interface, 4);

View File

@ -58,8 +58,6 @@ if (!isset($config['interfaces'][$interface]['enable'])) {
return;
}
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);
/* make sure only one script runs at a time beyond this point */
$fp = fopen('/tmp/newwanipv6_' . $argument, 'a+e');
if (!$fp || !flock($fp, LOCK_EX | LOCK_NB)) {
@ -79,8 +77,7 @@ system_resolver_configure();
list ($ip) = interfaces_primary_address6($interface);
if (!is_ipaddr($ip)) {
/* interface is not ready */
log_msg("Failed to detect IP for {$interface_descr}[{$interface}]", LOG_INFO);
log_msg("Failed to detect IP for interface {$interface}", LOG_INFO);
return;
}
@ -88,11 +85,11 @@ $cacheip_file = "/tmp/{$device}_oldipv6";
$cacheip = trim(@file_get_contents($cacheip_file));
if ($force == 'no' && $ip == $cacheip) {
log_msg("No IP change detected (current: {$ip}, interface: {$interface_descr}[{$interface}])", LOG_INFO);
log_msg("No IP change detected (current: {$ip}, interface: {$interface})", LOG_INFO);
return;
}
log_msg("IP renewal starting (new: {$ip}, old: {$cacheip}, interface: {$interface_descr}[{$interface}], device: {$device}, force: {$force})");
log_msg("IP renewal starting (new: {$ip}, old: {$cacheip}, interface: {$interface}, device: {$device}, force: {$force})");
interfaces_vips_configure($interface, 6);