소스 검색

openntpd: set time immediately from initscript

Match the systemd service file and set time immediately on startup
rather than small steps when it differs a lot.
On embedded scenarios this is better since boards that lack a
battery-backed RTC might start at unix epoch and the time set will delay
for quite a while otherwise.
For boards that do have a battery-backed RTC the behaviour will be
practically the same unless the RTC drifts a lot.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Gustavo Zacarias 9 년 전
부모
커밋
80003ab6cf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      package/openntpd/S49ntp

+ 1 - 1
package/openntpd/S49ntp

@@ -6,7 +6,7 @@
 case "$1" in
 case "$1" in
 	start)
 	start)
 		printf "Starting openntpd: "
 		printf "Starting openntpd: "
-		start-stop-daemon -S -x /usr/sbin/ntpd -- -p /run/ntpd.pid
+		start-stop-daemon -S -x /usr/sbin/ntpd -- -s -p /run/ntpd.pid
 		[ $? = 0 ] && echo "OK" || echo "FAIL"
 		[ $? = 0 ] && echo "OK" || echo "FAIL"
 		;;
 		;;
 	stop)
 	stop)