manipulating/testing file times.
David Collier
from_busybox_maillist at dexdyne.com
Sat Nov 27 01:19:00 UTC 2010
> coreutils' touch actually allows relative dates and times:
>
> touch -d "+3 days" FILE
>
> does what you would expect. That's a potential enhancement to
> Busybox.
That's very sexy, and pretty close to perfect.
What I'm trying to do is to do a dhcp request - if it fails I want to do
another one, but only every 15 minutes or so. I'm not aware of a built-in
capability of udhcpc to do that, so I need to SIGUSR1 it from time to
time.
I can have a dedicated process which deals with this, but it is actually
easier to debug if I have a file on the machine which has he "time" of
the next moment when I will retry. Then my script just tests "now"
against the file time.
I want to do the same in a shepherd script for dhcp, OpenVPN and a couple
of other things which must run for 5 years! If the processes collapse,
I'll try restarting them, but I'm not going to thrash it every 2 seconds.
Thanks for the help
David
More information about the busybox
mailing list