[packages] ntpclient: Allow ntpclient to run without default route installed
authoracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 4 Jun 2009 14:59:42 +0000 (14:59 +0000)
committeracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 4 Jun 2009 14:59:42 +0000 (14:59 +0000)
This allows the use of ntp server inside a LAN where there isn't any internet access

git-svn-id: svn://svn.openwrt.org/openwrt/packages@16337 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/ntpclient/files/ntpclient.hotplug

index 634529c..29f17c1 100644 (file)
@@ -52,12 +52,11 @@ load_settings() {
 config_load ntpclient
 config_foreach load_settings ntpclient
 
-DEF_ROUTE=`route -n | grep '^0.0.0.0'`
 NTP_RUNNING=`ps  | grep $NTPC | grep -v grep`
 
 case "${ACTION:-ifup}" in
        ifup)
-               [ -n "$DEF_ROUTE" -a -z "$NTP_RUNNING" ] && start_ntpclient 
+               [ -z "$NTP_RUNNING" ] && start_ntpclient 
        ;;
        ifdown)
                [ -n "$NTP_RUNNING" ] && stop_ntpclient