Project

General

Profile

« Previous | Next » 

Revision 8d9cbe6f

Added by Ermal LUÇI almost 15 years ago

Fixes #684. Test file existence before trying to kill the process. Also correct interface name passed as parameter to interface_configure function, it should fix another ticket as a byproduct.

View differences:

etc/inc/interfaces.inc
824 824
		if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
825 825
			foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
826 826
				if ($realif == $ppp['if']) {
827
					killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
828
					sleep(2);
827
					if (file_exists("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid")) {
828
						killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
829
						sleep(2);
830
					}
829 831
					unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
830 832
					if (isset($ppp['ondemand']) && !$destroy) {
831
						interface_configure("wan");
833
						interface_configure($interface);
832 834
					}
833 835
					break;
834 836
				}

Also available in: Unified diff