Revision 74fa57aa
Added by Seth Mos over 13 years ago
etc/inc/interfaces.inc | ||
---|---|---|
1113 | 1113 |
$pidv6 = find_dhcp6c_process($realif); |
1114 | 1114 |
if($pidv6) |
1115 | 1115 |
mwexec("/bin/kill {$pidv6}"); |
1116 |
sleep(1);
|
|
1116 |
sleep(3);
|
|
1117 | 1117 |
unlink_if_exists("{$g['varetc_path']}/dhcp6c_{$interface}.conf"); |
1118 | 1118 |
if(does_interface_exist("$realif")) { |
1119 | 1119 |
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete", true); |
... | ... | |
2682 | 2682 |
|
2683 | 2683 |
function find_dhcp6c_process($interface) { |
2684 | 2684 |
if ($interface) |
2685 |
$pid = `/bin/ps auxw|grep "dhcp6c" |grep "{$interface}"|awk '{print $2}'`;
|
|
2685 |
$pid = `/bin/ps auxw|grep "[d]hcp6c" |grep "{$interface}"|awk '{print $2}'`;
|
|
2686 | 2686 |
else |
2687 |
$pid = 0;
|
|
2687 |
return(false);
|
|
2688 | 2688 |
|
2689 | 2689 |
return intval($pid); |
2690 | 2690 |
} |
... | ... | |
2979 | 2979 |
if(!$wancfg['track6-interface'] <> "") { |
2980 | 2980 |
return(false); |
2981 | 2981 |
} |
2982 |
log_error("Interface {$interface} configured via {$wancfg['track6-interface']} type {$config['interfaces'][$wancfg['track6-interface']]['ipaddrv6']}"); |
|
2983 | 2982 |
|
2984 | 2983 |
$type = $config['interfaces'][$wancfg['track6-interface']]['ipaddrv6']; |
2985 | 2984 |
switch($type) { |
Also available in: Unified diff
Fix the find dhcp6 process function to report the actual pid instead of the grep pid.
Remove spurious double debug line