07-29-2020, 09:11 PM
07-29-2020, 09:36 PM
You could hack /var/www/command/worker.php. Currently it checks 5 times and there is a 3 sec delay between checks so total of 15 sec max wait.
The line to modify in the code block below is: $eth0ip = waitForIpAddr('eth0', 5);
Change 5 to something > 5 then save the file and reboot.
The line to modify in the code block below is: $eth0ip = waitForIpAddr('eth0', 5);
Change 5 to something > 5 then save the file and reboot.
Code:
//
workerLog('worker: -- Network');
//
// Check ETH0
$eth0 = sysCmd('ip addr list | grep eth0');
if (!empty($eth0)) {
workerLog('worker: eth0 exists');
// Wait for address (default), setting is on system config
if ($_SESSION['eth0chk'] == '1') {
$eth0ip = waitForIpAddr('eth0', 5);
}
else {
$eth0ip = sysCmd("ip addr list eth0 | grep \"inet \" |cut -d' ' -f6|cut -d/ -f1");
}
}
else {
$eth0ip = '';
workerLog('worker: eth0 does not exist');
}
!empty($eth0ip[0]) ? log_network_info('eth0') : workerLog('worker: eth0 address not assigned');
07-29-2020, 10:01 PM
Done!
Thanks Tim for a such a speedy reply.
Thanks Tim for a such a speedy reply.
07-29-2020, 10:17 PM
I'm curious do you know what might be causing DHCP to be so slow at handing out IP address? Usually is almost instant.
07-30-2020, 08:38 AM
(07-29-2020, 10:17 PM)Tim Curtis Wrote: [ -> ]I'm curious do you know what might be causing DHCP to be so slow at handing out IP address? Usually is almost instant.
I'm using this as a wifi range extender, connected to Pi by ethernet: https://www.gl-inet.com/products/gl-mt300n-v2/
It takes a while to boot up and if I power that and the Pi at the same time the Pi (with a USB DAC) won't connect.
With my other system using a HAT I2S DAC the longer delay doesn't seem to be necessary.