lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

ntpd.hotplug-helper (221B)


      1 #!/bin/sh
      2 
      3 while true
      4 do
      5 	STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
      6 
      7 	if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ]
      8 	then
      9 		ACTION="stratum" /sbin/hotplug-call ntp
     10 		exit 0
     11 	fi
     12 	sleep 10
     13 done