On Sun, Jul 07, 2002 at 02:30:13PM +0300, Gilad Ben-Yossef wrote:
> On Sun, 2002-07-07 at 13:15, Dan Kenigsberg wrote:
> > I read from the dhcpcd manual that:
> >                       dhcpcd  will not fork into background until
> >               it gets a valid IP address  in  which  case  dhcpcd
> >               will  return  0  to  the parent process.  In a case
> >               dhcpcd  times  out  before  receiving  a  valid  IP
> >               address  from  DHCP  server dhcpcd will return exit
> >               code 1 to the parent process.
> > 
> > why is that? Isn't it more logical to hover around untill a server IS found? any
> > idea how to cirumvent this?
> 
> It is so because otherwise you'll only cover one specific case and in
> Unix world the writer of the program does not persume to tell you how to
> use it, he is writing a tool for you to use in whatever suites you. Like
> this for exmaple, that does what you want:
> 
> while { ! /sbin/dhcpcd; } ; do echo Retrying DHCP...; sleep 5; done

A process-creating loop with 5 secs latency instead of a recvfrom a udp socket?
sounds like a waste of resources. I still believe that the proper way was to add
an option to detach without waiting (or use 0 timeout for that). And it should
be the default for laptops, even though this is how MS OSs behave.

but I would probably add this one to my rc.local... yuck. Thanks.

Dan.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to