Project

General

Profile

« Previous | Next » 

Revision 42982b22

Added by Ermal Luçi over 10 years ago

Bring back the old way of waiting for 3 times of 10seconds on bootup for a ppp type interface to come up. while here also do bringup of virtual interfaces only when not booting

View differences:

etc/inc/interfaces.inc
1823 1823
	}
1824 1824
	/* wait for upto 10 seconds for the interface to appear (ppp(oe)) */
1825 1825
	$i = 0;
1826
	while($i < 10) {
1827
		unset($out);
1828
		exec("/sbin/ifconfig " . escapeshellarg($ppp['if']) . " 2>&1", $out, $ret);
1829
		if($ret == 0)
1826
	while($i < 3) {
1827
		sleep(10);
1828
		if (does_interface_exist($ppp['if'], true))
1830 1829
			break;
1831
		sleep(1);
1832 1830
		$i++;
1833 1831
	}
1834 1832

  
......
2883 2881
		$interface_to_check = $realhwif;
2884 2882

  
2885 2883
	/* Need to check that the interface exists or not in the case where its coming back from disabled state see #3270 */
2886
	if (in_array(substr($realif, 0, 3), array("gre", "gif")) || !does_interface_exist($interface_to_check))
2884
	if (!platform_booting() && (in_array(substr($realif, 0, 3), array("gre", "gif")) || !does_interface_exist($interface_to_check)))
2887 2885
		interface_virtual_create($interface_to_check);
2888 2886

  
2889 2887
	/* Disable Accepting router advertisements unless specifically requested */

Also available in: Unified diff