From 00518840da211a2d5dcef0ccb3b242aed28b7327 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 9 Nov 2008 05:43:20 +0000 Subject: [PATCH] Sync the time on ip change and alert the logs --- etc/rc.newwanip | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 8045fbef16..016935947f 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();