This moves the loop check in the hotplug script up to finish it as soon as
possible.
A minimal code cleaning of extra tabs after '$cfg count' is included too.
Signed-off-by: Steffen Hoffmann <[EMAIL PROTECTED]>
Index: ntpclient/files/ntpclient.hotplug
===================================================================
--- ntpclient/files/ntpclient.hotplug (revision 10180)
+++ ntpclient/files/ntpclient.hotplug (working copy)
@@ -11,11 +11,11 @@
case "$cfgtype" in
ntpclient)
+ [ "$DONE" = "1" ] && exit 0
config_get hostname $cfg hostname
config_get port $cfg port
- config_get count $cfg count
+ config_get count $cfg count
- [ "$DONE" = "1" ] && exit 0
ps | grep 'bin/[n]tpclient' >&- || {
route -n 2>&- | grep '^0.0.0.0' >&- && {
/usr/sbin/ntpclient -c ${count:-1} -s
-h $hostname -p ${port:-123} 2>&- >&- && DONE=1
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel