3058d3057 < 3070a3070,3085 > function kill_dhcp6client_process($interface) { > if (empty($interface) || !does_interface_exist($interface)) { > return; > } > > $i = 0; > while ((($pid = find_dhcp6c_process($interface)) != 0) && ($i < 3)) { > /* 3rd time make it die for sure */ > $sig = ($i == 2 ? SIGKILL : SIGTERM); > posix_kill($pid, $sig); > sleep(1); > $i++; > } > unset($i); > } > 3995,3996c4010,4014 < $rtsoldscript .= "if [ -f {$g['varrun_path']}/dhcp6c_{$wanif}.pid ]; then\n"; < $rtsoldscript .= "\t/bin/pkill -F {$g['varrun_path']}/dhcp6c_{$wanif}.pid\n"; --- > /* non ipoe Process */ > if (isset($wancfg['dhcp6pppoe'])){ > $rtsoldscript .= "if [ -f {$g['varrun_path']}/dhcp6c_{$wanif}.pid ]; then\n"; > $rtsoldscript .= "\t/bin/pkill -F {$g['varrun_path']}/dhcp6c_{$wanif}.pid\n"; > } 4025c4043,4046 < --- > if (!isset($wancfg['dhcp6pppoe'])){ > kill_dhcp6client_process($wanif); mwexec("/usr/local/sbin/dhcp6c {$debugOption} -c {$g['varetc_path']}/dhcp6c_wan.conf -p {$g['varrun_path']}/dhcp6c_{$wanif}.pid {$wanif}"); > mwexec("/usr/bin/logger -t mwtag 'Starting dhcp6 client for interface wan({$wanif} in IPoE mode)'"); > }