2 # Begin $rc_base/init.d/ntp
7 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/time
/settings
)
11 if [ "$ENABLESETONBOOT" == "on" ]; then
12 boot_mesg
-n "Setting time on boot..."
13 pidof wpa_supplicant dhcpcd
2>&1 > /dev
/null
14 if [ "${?}" == "0" ]; then
15 if [ ! -e /var
/ipfire
/red
/active
]; then
17 boot_mesg
-n "Waiting for red connection"
18 for (( i
=30; i
>1; i--
)) do
19 if [ -e /var
/ipfire
/red
/active
]; then
28 if [ -e /var
/ipfire
/red
/active
]; then
30 loadproc
/usr
/local
/bin
/settime $
(cat /var
/ipfire
/time
/settime.conf
)
32 boot_mesg
" ERROR! Not online!"
37 boot_mesg
"Starting ntpd..."
38 loadproc
/usr
/bin
/ntpd
-Ap /var
/run
/ntpd.pid
42 boot_mesg
"Stopping ntpd..."
43 killproc
/usr
/bin
/ntpd
53 statusproc
/usr
/bin
/ntpd
57 echo "Usage: $0 {start|stop|restart|status}"
62 # End $rc_base/init.d/ntp