From fd44e282789375f584fbc13a501407f4bbe751ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Sun, 20 Jul 2008 18:47:09 +0000 Subject: Remove code used by ez-ipupdate, it is now obsolete. --- etc/inc/services.inc | 89 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 87 deletions(-) (limited to 'etc') diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 22c3bbc..9513f9b 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -461,12 +461,6 @@ function services_dyndns_reset() { echo "services_dyndns_reset() being called $mt\n"; } - if (file_exists("{$g['vardb_path']}/ez-ipupdate*.cache")) { - conf_mount_rw(); - unlink("{$g['vardb_path']}/ez-ipupdate*.cache"); - conf_mount_ro(); - } - mwexec("rm {$g['varetc_path']}/ez-ipupdate*.cache"); mwexec("rm {$g['varetc_path']}/dyndns*.cache"); @@ -489,30 +483,16 @@ function services_dyndns_configure() { /* determine interface name */ $if = get_real_wan_interface($dyndns['interface']); - if ($g['booting']) { + if ($g['booting']) echo "Starting DynDNS clients..."; - if (isset($config['system']['use_old_dyndns'])) { - echo " [Using ez-ipupdate] "; - services_dyndns_configure_old($if); - continue; - } - } else { + else sleep(1); - if (isset($config['system']['use_old_dyndns'])) { - services_dyndns_configure_old($if); - continue; - } - } /* load up the dyndns.class */ require_once("dyndns.class"); log_error("DynDns: Running updatedns()"); - - /* get ip */ - $ip = find_interface_ip($if); - $dns = new updatedns($dnsService = $dyndns['type'], $dnsHost = $dyndns['host'], $dnsUser = $dyndns['username'], @@ -529,71 +509,6 @@ function services_dyndns_configure() { return 0; } -function services_dyndns_configure_old($if) { - global $config, $g; - if(isset($config['system']['developerspew'])) { - $mt = microtime(); - echo "services_dyndns_configure_old() being called $mt\n"; - } - - /* kill any running ez-ipupdate */ - /* ez-ipupdate needs SIGQUIT instead of SIGTERM */ - sigkillbypid("{$g['varrun_path']}/ez-ipupdate_{$if}.pid", "QUIT"); - - $dyndnscfg = $config['dyndnses']['dyndns']; - $wancfg = $config['interfaces'][$if]; - - sleep(1); - - /* write ez-ipupdate.conf */ - $fd = fopen("{$g['varetc_path']}/ez-ipupdate_{$if}.conf", "w"); - if (!$fd) { - printf("Error: cannot open ez-ipupdate_{$if}.conf in services_dyndns_configure().\n"); - return 1; - } - - $ezipupdateconf = <<