new startup
[wyse_ntpd.git] / src / buildroot-2013.05 / custom / filesystem / etc / init.d / S99final_sequence
1 #!/bin/sh
2
3 if [ -f /fs/config/system ]
4 then
5         . /fs/config/system
6 else
7         mkdir -p /fs/config/
8 fi
9
10 if [ ! -f /fs/config/dropbear.tar ]
11 then
12         RD=`pwd`
13         cd /
14         tar cf /fs/config/dropbear.tar /etc/dropbear
15         cd $RD
16 fi
17
18 if [ -f /fs/config/ntp.conf ]
19 then
20         setserial /dev/ttyS0 low_latency
21         ntpd -c /fs/config/ntp.conf -x -g -N
22 fi
23
24 if [ -f /var/www/data ]
25 then
26
27         mknod /var/www/data/reboot p
28         (cat > /var/www/data/reboot; reboot)&
29
30         cldate=`date '+%d.%m.%Y'`
31         touch /var/www/data/ntp.log.$cldate
32
33         (while(true); do ntpq -c lpe -n >> /var/www/data/ntp.log.*; sleep 30; done)
34 fi