Project

General

Profile

« Previous | Next » 

Revision 9b6010ff

Added by Ermal LUÇI over 12 years ago

Run rtsold only for one reply since it will spam with dhcp6c processes otherwise. Also remove ambiguity by using curlies in functions

View differences:

etc/inc/interfaces.inc
2694 2694
function find_rtsold_process($interface) {
2695 2695
	global $g;
2696 2696

  
2697
	if ($interface)
2697
	if ($interface) {
2698 2698
		if (isvalidpid("{$g['varrun_path']}/rtsold_{$interface}.pid"))
2699 2699
			$pid = trim(file_get_contents("{$g['varrun_path']}/rtsold_{$interface}.pid"), " \n");
2700
	else
2700
		else
2701
			retun (false);
2702
	} else
2701 2703
		return(false);
2702 2704

  
2703 2705
	return intval($pid);
......
2706 2708
function find_dhcp6c_process($interface) {
2707 2709
	global $g;
2708 2710

  
2709
	if ($interface)
2711
	if ($interface) {
2710 2712
		if (isvalidpid("{$g['varrun_path']}/dhcp6c_{$interface}.pid"))
2711 2713
			$pid = trim(file_get_contents("{$g['varrun_path']}/dhcp6c_{$interface}.pid"), " \n");
2712
	else
2714
		else
2715
			retun (false);
2716
	} else
2713 2717
		return(false);
2714 2718

  
2715 2719
	return intval($pid);
......
3577 3581
	/* fire up rtsold for IPv6 RAs first, this backgrounds immediately. It will call dhcp6c */
3578 3582
	if (isvalidpid("{$g['varrun_path']}/rtsold_{$wanif}.pid"))
3579 3583
		killbypid("{$g['varrun_path']}/rtsold_{$wanif}.pid");
3580
	mwexec("/usr/sbin/rtsold -m -p {$g['varrun_path']}/rtsold_{$wanif}.pid -O {$g['varetc_path']}/rtsold_{$wanif}_script.sh {$wanif}");
3584
	mwexec("/usr/sbin/rtsold -1 -p {$g['varrun_path']}/rtsold_{$wanif}.pid -O {$g['varetc_path']}/rtsold_{$wanif}_script.sh {$wanif}");
3581 3585

  
3582 3586
	/* NOTE: will be called from rtsold invoked script 
3583 3587
	 * link_interface_to_track6($interface, "update");

Also available in: Unified diff