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: only restart ntpd when the wan interface comes up and ntpd is enabled
Signed-off-by: Peter Wagner <tripolar@gmx.at>
lilik-openwrt-22.03
Peter Wagner
8 years ago
parent
836f875a33
commit
228764bfe8
1 changed files
with
5 additions
and
4 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-4
net/ntpd/files/ntpd.hotplug
+ 5
- 4
net/ntpd/files/ntpd.hotplug
View File
@ -1,10 +1,11 @@
#!/bin/sh
NAME=ntpd
NAME=ntpd
CONFIG=/etc/ntp.conf
COMMAND=/sbin/$NAME
COMMAND=/etc/init.d/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ -x $COMMAND ] && [ -r $CONFIG ]
&& {
$COMMAND enabled
&& {
killall ntpd
killall ntpd
/etc/init.d/ntpd
start
$COMMAND
start
} &
} &
}
}
Write
Preview
Loading…
Cancel
Save