summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-09 05:43:20 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-09 05:43:20 +0000
commit00518840da211a2d5dcef0ccb3b242aed28b7327 (patch)
tree2b722903a0282beeb81c1a38fc1b379c91f0548b /etc/rc.newwanip
parentd271761b8c95ba945491954fded4a9981714ecc2 (diff)
downloadpfsense-00518840da211a2d5dcef0ccb3b242aed28b7327.zip
pfsense-00518840da211a2d5dcef0ccb3b242aed28b7327.tar.gz
Sync the time on ip change and alert the logs
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 8045fbe..0169359 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -107,9 +107,13 @@ filter_configure();
enable_rrd_graphing();
/* restart packages */
-if($old_ip <> "")
- if($old_ip <> $curwanip)
+if($old_ip <> "") {
+ if($old_ip <> $curwanip) {
+ mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh");
exec("/etc/rc.start_packages");
+ log_error("pfSense package system has detected an ip change $old_ip -> $curwanip ... Restarting packages.");
+ }
+}
/* reconfigure our gateway monitor */
setup_gateways_monitor();
OpenPOWER on IntegriCloud