summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
committerRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
commit60063627a6d540871061854a362047e6517f821c (patch)
tree0de228630450c64e085f2e3f5141b5ba17eccab3 /examples
parentec39cb770ddd5c0e085d5c4ee10be65bab5e7a44 (diff)
parent9a595bb36ded308e6d4336aef2c1cd3ac738a398 (diff)
downloadbusybox-w32-FRP.tar.gz
busybox-w32-FRP.tar.bz2
busybox-w32-FRP.zip
Merge branch 'busybox' into mergeFRP
Diffstat (limited to '')
-rwxr-xr-xexamples/android-build2
-rwxr-xr-xexamples/var_service/ntpd/ntp.script21
2 files changed, 21 insertions, 2 deletions
diff --git a/examples/android-build b/examples/android-build
index 89f3b637a..123ba966e 100755
--- a/examples/android-build
+++ b/examples/android-build
@@ -29,4 +29,6 @@ else
29 LDLIBS="dl m c gcc" 29 LDLIBS="dl m c gcc"
30fi 30fi
31 31
32# It's possible with newer version
33# you need to use CFLAGS_busybox instead of EXTRA_LDFLAGS below:
32make EXTRA_LDFLAGS="$LDFLAGS" LDLIBS="$LDLIBS" "$@" 34make EXTRA_LDFLAGS="$LDFLAGS" LDLIBS="$LDLIBS" "$@"
diff --git a/examples/var_service/ntpd/ntp.script b/examples/var_service/ntpd/ntp.script
index 76c34bf74..8542181eb 100755
--- a/examples/var_service/ntpd/ntp.script
+++ b/examples/var_service/ntpd/ntp.script
@@ -10,12 +10,30 @@
10 10
11dt=`date '+%Y-%m-%d %H:%M:%S'` 11dt=`date '+%Y-%m-%d %H:%M:%S'`
12 12
13echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"
14
15if test x"$1" = x"unsync" \
16; then
17 # No replies for our NTP requests were seen for some time.
18 #
19 # Among more mundate cases like network outages, this happens
20 # if we ran for a LONG time (days) and ntp server's IP has changed.
21 # ntpd has no code to re-resolve peers' addresses to IPs,
22 # we need to help it:
23 #
24 echo "$dt: $1"\
25 "syncronization lost, restarting ntpd"\
26 >>"$0.log.$$"
27 mv -- "$0.log.$$" "$0.log"
28 kill $PPID
29 exit
30fi
31
13if test x"$stratum" != x"" \ 32if test x"$stratum" != x"" \
14&& test x"$poll_interval" != x"" \ 33&& test x"$poll_interval" != x"" \
15&& test 4 -ge "$stratum" \ 34&& test 4 -ge "$stratum" \
16&& test 128 -le "$poll_interval" \ 35&& test 128 -le "$poll_interval" \
17; then 36; then
18 echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"
19 echo "$dt: $1"\ 37 echo "$dt: $1"\
20 "freq_drift_ppm=$freq_drift_ppm"\ 38 "freq_drift_ppm=$freq_drift_ppm"\
21 "offset=$offset"\ 39 "offset=$offset"\
@@ -27,7 +45,6 @@ if test x"$stratum" != x"" \
27 exec hwclock --systohc 45 exec hwclock --systohc
28fi 46fi
29 47
30echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"
31echo "$dt: $1"\ 48echo "$dt: $1"\
32 "freq_drift_ppm=$freq_drift_ppm"\ 49 "freq_drift_ppm=$freq_drift_ppm"\
33 "offset=$offset"\ 50 "offset=$offset"\