From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx.etorok.net (mx.etorok.net [IPv6:2a00:f48:1029::1:1a2:82ea]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.etorok.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 4AF1821F1E7 for ; Mon, 24 Mar 2014 15:09:34 -0700 (PDT) Received: by mx.etorok.net (OpenSMTPD) with ESMTP id 2492ae8a; for ; Tue, 25 Mar 2014 00:09:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=etorok.net; h= message-id:date:from:mime-version:to:references:in-reply-to :content-type:content-transfer-encoding; s=ml; l=1547; bh=RVRD4k u2+KBPY6icCkfsg6XpNtU=; b=QpOJdzQc9eryjA2ttImvSH/9dsrkI7VzHZOI96 ZPH8h+GsNt4FKQ9s71lsG3Yy6ZAwlddzF3+f5CG3/x0enFICDylKmXIhs8zzQj1E 7TjhUxAAXz50Ox3GxQA0AEAXzteH0FiyCim8kNauonXEWTiFcdCm7KO7UX8wHKf2 /psU4= Received: by mx.etorok.net (OpenSMTPD) with ESMTPSA id 10ecccd0; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-SHA bits=128 verify=NO; for ; Tue, 25 Mar 2014 00:09:28 +0200 (EET) Message-ID: <5330AD18.5000508@etorok.net> Date: Tue, 25 Mar 2014 00:09:28 +0200 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: cerowrt-devel@lists.bufferbloat.net References: <20140324191203.GA78098@redoubt.spodhuis.org> <878urzia18.fsf@alrua-x1.karlstad.toke.dk> In-Reply-To: <878urzia18.fsf@alrua-x1.karlstad.toke.dk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Cerowrt-devel] DNSSEC & NTP Bootstrapping X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 22:09:35 -0000 On 03/24/2014 11:03 PM, Toke Høiland-Jørgensen wrote: > Phil Pennock writes: > >> For context, I'm currently running OpenWRT; attached is the >> /etc/init.d/ntpdate which I'm using. It relies upon having Python and >> dig installed, as I haven't gotten around to building a small C >> utility to do just this task, but perhaps the approach is useful >> enough that someone else might do so? > > A functionality similar to this is already implemented in openwrt and > runs as the first thing on boot. It finds the newest file in /etc and > sets the system time to that: > > # cat /etc/init.d/sysfixtime > #!/bin/sh /etc/rc.common > # Copyright (C) 2013-2014 OpenWrt.org > > START=00 > > boot() { > local curtime="$(date +%s)" > local maxtime="$(find /etc -type f -exec date +%s -r {} \; | sort -nr | head -n1)" > [ $curtime -lt $maxtime ] && \ > date -s @$maxtime && \ > logger -t sysfixtime -p daemon.notice "Time fixed" > } > I haven't upgraded to -12 yet (still on -9), but logread doesn't seem to get its time updated: Sat Jan 17 03:41:38 1970 authpriv.notice dropbear[3747]: Pubkey auth succeeded for 'root' with key md5 2a:6d:49:b6:74:91:9c:34:f8:7a:2e:40:65:b2:e9:e9 from 172.30.42.12:52391 Although the date is right: # date Mon Mar 24 22:05:20 GMT 2014 I tried running sysfixtime manually, or just run the 'date -s ' manually, with no luck. Any idea how to get logread (or well the daemon/kernel) to update its timestamps? Best regards, --Edwin