interfaces: wait a second, if $ip_file is never read remove it #5367

Stranger things have happened...
This commit is contained in:
Franco Fichtner 2021-11-27 13:55:45 +01:00
parent 49210b3da8
commit ec3f62840a
3 changed files with 1 additions and 9 deletions

View File

@ -141,10 +141,6 @@ foreach (array_keys($restartifs) as $ifname) {
*/
ifgroup_setup();
/* ensured above that this is an IP address */
$ip_file = "/var/db/{$interface}_ip";
@file_put_contents($ip_file, $ip);
$cacheip_file = "/var/db/{$interface}_cacheip";
$cacheip = @file_get_contents($cacheip_file);

View File

@ -107,10 +107,6 @@ if (count(link_interface_to_track6($interface, true))) {
system_resolvconf_generate();
system_hosts_generate();
/* ensured above that this is an IP address */
$ip_file = "/var/db/{$interface}_ipv6";
@file_put_contents($ip_file, $ip);
$cacheip_file = "/var/db/{$interface}_cacheipv6";
$cacheip = @file_get_contents($cacheip_file);

View File

@ -154,8 +154,8 @@ fi
mkdir -p /var/etc
# clear nameserver, searchdomain and IP cache files
rm -f /var/db/*_ip /var/db/*_ipv6 /var/db/*_cacheip /var/db/*_cacheipv6
rm -f /var/etc/nameserver_* /var/etc/searchdomain_*
rm -f /var/db/*_cacheip /var/db/*_cacheipv6
# Clear all files in this directory to prevent stale state of
# services. At one point this also helped to prevent shutdown(8)