touch refuses to accept -d option

Tito farmatito at tiscali.it
Wed Dec 1 10:33:06 UTC 2010


On Wednesday 01 December 2010 11:26:00 David Collier wrote:
> In article <201012011007.41587.farmatito at tiscali.it>,
> farmatito at tiscali.it (Tito) wrote:
> 
> > *From:* Tito <farmatito at tiscali.it>
> > *To:* busybox at busybox.net, from_busybox_maillist at dexdyne.com
> > *Date:* Wed, 1 Dec 2010 10:07:41 +0100
> > 
> > On Wednesday 01 December 2010 00:03:00 David Collier wrote:
> > > At least that's what I think it's doing
> > > 
> > > /etc/udhcp # touch -d "2010-11-30 23:00:47" 
> > > /tmp/udhcpc/eth0/start_renew
> > > touch: invalid option -- d
> > > BusyBox v1.17.4 (2010-11-29 12:43:24 GMT) multi-call binary.
> > > 
> > > Usage: touch [-c] [-d DATE] FILE [FILE]...
> > > 
> > > Update the last-modified date on the given FILE[s]
> > > 
> > > Options:
> > >         -c      Don't create files
> > >         -d DT   Date/time to use
> > > 
> > > -------------------------------------------------------
> > > BusyBox v1.17.4 (2010-11-29 12:43:24 GMT) multi-call binary.
> > > Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
> > > 
> > > am I doing something silly  ??????
> > > 
> > > D
> > > _______________________________________________
> > > busybox mailing list
> > > busybox at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/busybox
> > > 
> > 
> > Hi,
> > 
> > opts = getopt32(argv, "c" IF_DESKTOP("r:d:t:")
> > 
> > option "t" needs ENABLE_DESKTOP to be set in config.
>  
> Oh FHS :-)
> 
> what has "desktop" got to do with what options touch accepts? 
> 
> OK - my system is not not not a desktop. It's a buried box that will run
> headless. 
> I could just go and turn the "desktop" option on, but what other baggage
> will it change - and would it matter to me? I'm not worried about the
> size of the executable - I have 256M of disk and 32M of RAM.

find busybox/ | grep ENABLE_DESKTOP

> ==========================================
> update
> 
> I have edited touch.c and conned it into believing it's running on a
> desktop - my touch command now accepts -d - so thanks for the help.
> 
> I note that touch actually accepts r, and t options, which are not
> covered in the usage info.
> 
> Just for fun I have edited usage.src.h so the d option appears and
> disappears with the desktop setting. I haven't added anything for t and r
> (yet)
> 
> 1. Can I "appeal" that the -d option on touch is useful even on
> non-desktop system and it should be "enabled on all versions". How do I
> go about such a thing?

A patch and a motivated email
> 2. I guess if the answer's no, I should submit a patch for usage.src.h
> Is there a howto - I guess I would be best with a proper CVS approach,
> which I could set up here, but is there a way to diff my file against the
> repository in some other way??

co coreutils/touch.c coreutils/touch.c.orig
modify coreutils/touch.c
diff -uN coreutils/touch.c.orig coreutils/touch.c
add your signed off by header to the patch
and submit to the list.

Ciao,
Tito
> Thanks
> 
> David
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
> 




More information about the busybox mailing list