Hi

----- Mail original -----
> De: "Bastian Bittorf" <[email protected]>
> À: "OpenWrt Development List" <[email protected]>
> Envoyé: Dimanche 29 Décembre 2013 22:18:07
> Objet: Re: [OpenWrt-Devel] [PATCH] Add sysfixtime init script, replacement of 
> luci_fixtime
> 
> * Etienne CHAMPETIER <[email protected]> [29.12.2013 22:09]:
> > Save time by touching /etc/config/sysfixtime, so it's
> > included in backups
> > Introduce save_time_interval config (in days) to choose
> > how often time is saved to flash (default 30)
> > Use busybox ntpd -S option so time is saved regularly
> > and not only on clean shutdown/reboot
> > Fix time on startup if system time is inferior to
> > stored time
> 
> what is the usecase of this?

When you do a fresh (re)start, openvpn complains because "certificate is not 
yet valid".
My patch allows to have a good enough date early in the boot process,
so openvpn can connect right away (and doesn't need to wait until ntpd sync)
and if for some reasons busybox ntpd can't sync time, my vpn still work

In the past, when openwrt was using rdate, it happened me once to be stuck 
outside
ntpd is pretty reliable but i prefer to have a backup plan (i'm planning to 
rely much more on my vpn)

In summer I can have many small power loss by day, so i don't want to wait each 
time
for ntpd to sync for openvpn to connect

In general if you use certificates you need "good enough" time, so you have to 
wait after ntpd sync.

30 days is the default save interval, in order to not write too often,
but you can put a smaller value (1?), or run "/etc/init.d/sysfixtime save" when 
needed
(when you renew/change your openvpn certificate, ...)

> 
> if you only safe the the time every 30 days your clock is
> wrong anyway. we played with this idea already and use now
> the "crashlog" for keep time over reboot, but i'am not
> totally happy with this solution for now.
> 
> bye, bastian

bye, etienne
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to