summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-01-21 22:54:55 +0000
committerErmal <eri@pfsense.org>2011-01-21 22:54:55 +0000
commit3d9e92526a9d6d6101ac4f7c7b3f97b164e0da37 (patch)
tree0259b2883191ce057293f83b16bf2e089159619a /etc/rc.newwanip
parent0e01b3c62391a96d6dc034571425f9451320b296 (diff)
downloadpfsense-3d9e92526a9d6d6101ac4f7c7b3f97b164e0da37.zip
pfsense-3d9e92526a9d6d6101ac4f7c7b3f97b164e0da37.tar.gz
Do not write the old ip to the cache file unless it changes. Might help in Ticket #943.
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index b63996c..b85d102 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -84,7 +84,6 @@ system_resolvconf_generate(true);
/* write current WAN IP to file */
file_put_contents("{$g['vardb_path']}/{$interface}_ip", $curwanip);
-file_put_contents("{$g['vardb_path']}/{$interface}_cacheip", $curwanip);
/* reconfigure static routes (kernel may have deleted them) */
system_routing_configure($interface);
@@ -107,6 +106,8 @@ if (is_ipaddr($oldip) && $curwanip == $oldip) {
exit;
}
+file_put_contents("{$g['vardb_path']}/{$interface}_cacheip", $curwanip);
+
/* perform RFC 2136 DNS update */
services_dnsupdate_process($interface);
OpenPOWER on IntegriCloud