Comment Re:Because it can be done (Score 1) 628
umm, two things:
and then other stuff will continue to run while dhcpcd is trying to connect (which isnt necessarilly a good thing, but its the only way you could do it in python either. there are only two ways a program (and python and bash are both programs) can run another program. either exec it and wait for it to finish, or fork then exec it and keep on executing)
first, dhcp does not try "for minutes" to get a lease, it tries for about a minute, and you can change the timeout to whatever you want it to be.
second, you could get rid of the problem altogether by changing the line in your rc script that says:
todhcpcd
dhcpcd &
and then other stuff will continue to run while dhcpcd is trying to connect (which isnt necessarilly a good thing, but its the only way you could do it in python either. there are only two ways a program (and python and bash are both programs) can run another program. either exec it and wait for it to finish, or fork then exec it and keep on executing)