manipulating/testing file times.
David Collier
from_busybox_maillist at dexdyne.com
Mon Nov 29 11:34:00 UTC 2010
Thank you for pointing me to that :-)
I may still feel happier doing it manually - I can put it in my system
log that way.
and I don't know how it will handle the underlying transport being down.
But well worth experimenting with - it would certainly make things
simpler to use it.
D
In article <201011272124.48417.vda.linux at googlemail.com>,
vda.linux at googlemail.com (Denys Vlasenko) wrote:
> *From:* Denys Vlasenko <vda.linux at googlemail.com>
> *To:* busybox at busybox.net, from_busybox_maillist at dexdyne.com
> *Date:* Sat, 27 Nov 2010 21:24:48 +0100
>
> On Saturday 27 November 2010 02:19, David Collier wrote:
> > > 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.
>
> It has --tryagain option for that:
>
> $ udhcpc --help
> BusyBox v1.18.0 (2010-11-23 00:11:12 CET) multi-call binary.
>
> Usage: udhcpc [-fbnqvoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
> [-H HOSTNAME] [-V VENDOR] [-x OPT:VAL]... [-O OPT]...
>
> -i,--interface IFACE Interface to use (default eth0)
> -p,--pidfile FILE Create pidfile
> -s,--script PROG Run PROG at DHCP events (default
> /usr/share/udhcpc/default.script)
> -t,--retries N Send up to N discover packets
> -T,--timeout N Pause between packets (default 3
> seconds)
> -A,--tryagain N Wait N seconds after failure
> (default 20)
> ...
>
> > 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.
>
> And if the time is not reached, the script will do ... what?
>
> --
> vda
>
More information about the busybox
mailing list