This website works better with JavaScript.
Home
Help
Sign In
LILiK
/
openwrt-packages-dist
Watch
5
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
ntpd: *mimic the behaviour of the busybox ntpd's "-S" flag
*create a seperate line for every server, otherwise only the first listed server will be used
lilik-openwrt-22.03
Peter Wagner
7 years ago
parent
4e2336c5f4
commit
04654291a4
3 changed files
with
10 additions
and
5 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
net/ntpd/Makefile
+5
-3
net/ntpd/files/ntpd.hotplug-helper
+4
-1
net/ntpd/files/ntpd.init
+ 1
- 1
net/ntpd/Makefile
View File
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME
:=
ntp
PKG_VERSION
:=
4.2.8p10
PKG_RELEASE
:=
2
PKG_RELEASE
:=
3
PKG_SOURCE
:=
$(
PKG_NAME
)
-
$(
PKG_VERSION
)
.tar.gz
PKG_SOURCE_URL
:=
http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
+ 5
- 3
net/ntpd/files/ntpd.hotplug-helper
View File
@ -1,13 +1,15 @@
#!/bin/sh
SLEEPTIME=10
while true
do
STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
if [ -n "$STATUS"
]
&&
[
"$STATUS" -lt "16" ]
if [
[
-n "$STATUS" && "$STATUS" -lt "16" ]
]
then
ACTION="stratum" /sbin/hotplug-call ntp
exit
0
SLEEPTIME=66
0
fi
sleep
10
sleep
$SLEEPTIME
done
+ 4
- 1
net/ntpd/files/ntpd.init
View File
@ -68,7 +68,10 @@ start_service() {
emit ""
fi
emit "server $server iburst"
for i in $server
do
emit "server $i iburst"
done
mkdir -p /var/lib/ntp
chown -R ntp:ntp /var/lib/ntp
Write
Preview
Loading…
Cancel
Save