Hi Christian, thanks for suggesting the file based triggers, hadn't thought of that. Combining that with the hook into update-ieee-data should indeed works fine and is much better than doing stuff on service startup.
On Mon, 27 Mar 2017 11:06:47 +0200 Christian Seiler <christ...@iwakd.de> wrote: > On 03/27/2017 12:24 AM, Lukas Schwaighofer wrote: > > The easiest way for me to check if the converted database is > > up-to-date is to depend on the existence > > of /var/lib/ieee-data/.lastupdate . Is that ok? > > As far as I understand it, yes. > > That said: what do you consider outdated? I've never checked how > often the OUI database changes, but as far as I can tell the > updates happen as needed, not according to a specific schedule. > That means that if nobody requested an update, the database is > not out of date, even if it's old. > > What you could do is check the .lastupdate file only if a lookup > fails - and if it's older than a week, display a message. But > that would require direct patching of arpwatch, so the much > simpler solution could be to just add an entry to README.Debian > that tells the user to run update-ieee-data if they want to > have an updated database. Currently the database isn't udpated at > all, so this is already going to be an improvement. I should have been more explicit in my question. My idea was to copy /var/lib/ieee-data/.lastupdate into /var/lib/arpwatch/.lastupdate so I can use `cmp` to see if I need to update. However that would have only been necessary when creating the database during init. Since, with your help, I was able to implement this more elegantly, this is no longer relevant. Regards Lukas