* etienne.champet...@free.fr <etienne.champet...@free.fr> [02.01.2014 21:10]: > > so simply set the system-time to the filedate of your cert + X > > seconds. > > It seems much more complicated (where is the cert, also it need openssl-util > to decode the cert, ...) > and would only work for openvpn. Other (vpn) software relying on certs still > need this.
you can implement this in a generic way: simply set the system-time to the newest filedate you found in e.g. /etc - try this: #!/bin/sh /etc/rc.common START=00 get_unixtimes() { local file month month_number find /etc -type f | while read file; do set -- $( ls -dle "$file" ) month_number=0 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do month_number=$(( $month_number + 1 )) [ "$7" = "$month" ] && break done date --date "${10}-${month_number}-${8} ${9}" +%s done } boot() { date --set @$( get_unixtimes | sort -n | head -n1 ) } #### bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel