Project

General

Profile

« Previous | Next » 

Revision 5f3e1f12

Added by Scott Ullrich over 18 years ago

Misc OpenNTPD changes. Do not restart on wan ip change

View differences:

etc/inc/system.inc
888 888
	/* open configuration for wrting or bail */
889 889
	$fd = fopen("{$g['varetc_path']}/ntpd.conf","w");
890 890
	if(!$fd) {
891
		log_error("Could not open {$g['varetc_path']}/ntpd.conf");
891
		log_error("Could not open {$g['varetc_path']}/ntpd.conf for writing");
892 892
		return;
893 893
	}
894 894

  
......
907 907
	fclose($fd);
908 908

  
909 909
	/* if openntpd is running, kill it */
910
	if(is_process_running("ntpd"))
910
	while(is_process_running("ntpd")) {
911 911
		exec("/usr/bin/killall ntpd");
912
		sleep(3);
913
	}
914

  
915
	/* if /var/empty does not exist, create it */
916
	if(!is_dir("/var/empty"))
917
		exec("/bin/mkdir -p /var/empty && chmod ug+rw /var/empty/.");
918

  
919
	sleep(1);
912 920

  
913 921
	/* start opentpd, set time now and use /var/etc/ntpd.conf */
914 922
	exec("/usr/local/sbin/ntpd -s -f {$g['varetc_path']}/ntpd.conf");

Also available in: Unified diff