summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-03 00:18:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-03 00:18:32 +0000
commit5f3e1f12c36b8a79543857965b6cdbb7a4b7c9cf (patch)
tree453c17324f7082c640d30c500358fd9aff90a484 /etc/inc
parentb9d28d255a00aa0759f9c32f2eda28389a34dd5a (diff)
downloadpfsense-5f3e1f12c36b8a79543857965b6cdbb7a4b7c9cf.zip
pfsense-5f3e1f12c36b8a79543857965b6cdbb7a4b7c9cf.tar.gz
Misc OpenNTPD changes. Do not restart on wan ip change
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/system.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index dff60da..31633da 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -888,7 +888,7 @@ function system_ntp_configure() {
/* open configuration for wrting or bail */
$fd = fopen("{$g['varetc_path']}/ntpd.conf","w");
if(!$fd) {
- log_error("Could not open {$g['varetc_path']}/ntpd.conf");
+ log_error("Could not open {$g['varetc_path']}/ntpd.conf for writing");
return;
}
@@ -907,8 +907,16 @@ function system_ntp_configure() {
fclose($fd);
/* if openntpd is running, kill it */
- if(is_process_running("ntpd"))
+ while(is_process_running("ntpd")) {
exec("/usr/bin/killall ntpd");
+ sleep(3);
+ }
+
+ /* if /var/empty does not exist, create it */
+ if(!is_dir("/var/empty"))
+ exec("/bin/mkdir -p /var/empty && chmod ug+rw /var/empty/.");
+
+ sleep(1);
/* start opentpd, set time now and use /var/etc/ntpd.conf */
exec("/usr/local/sbin/ntpd -s -f {$g['varetc_path']}/ntpd.conf");
OpenPOWER on IntegriCloud