projects
/
feed
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
836f875
)
ntpd: only restart ntpd when the wan interface comes up and ntpd is enabled
author
Peter Wagner
<tripolar@gmx.at>
Mon, 6 Mar 2017 08:20:28 +0000
(09:20 +0100)
committer
Peter Wagner
<tripolar@gmx.at>
Mon, 6 Mar 2017 08:20:28 +0000
(09:20 +0100)
Signed-off-by: Peter Wagner <tripolar@gmx.at>
net/ntpd/files/ntpd.hotplug
patch
|
blob
|
history
diff --git
a/net/ntpd/files/ntpd.hotplug
b/net/ntpd/files/ntpd.hotplug
index 975be751ec78a189091eaaa7d7c630b09303e5ea..36cbe15976aece6106d15ce40ecd3375b6610827 100644
(file)
--- a/
net/ntpd/files/ntpd.hotplug
+++ b/
net/ntpd/files/ntpd.hotplug
@@
-1,10
+1,11
@@
+#!/bin/sh
+
NAME=ntpd
-CONFIG=/etc/ntp.conf
-COMMAND=/sbin/$NAME
+COMMAND=/etc/init.d/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
-
[ -x $COMMAND ] && [ -r $CONFIG ]
&& {
+
$COMMAND enabled
&& {
killall ntpd
-
/etc/init.d/ntpd
start
+
$COMMAND
start
} &
}