diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-07-20 18:47:09 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-07-20 18:47:09 +0000 |
commit | fd44e282789375f584fbc13a501407f4bbe751ca (patch) | |
tree | 40efea9a6bd4baa99f9db2f3edb6e10000977d3b /etc | |
parent | 05025c6eb321062bdc2fc3c6a4ae685a4586904a (diff) | |
download | pfsense-fd44e282789375f584fbc13a501407f4bbe751ca.zip pfsense-fd44e282789375f584fbc13a501407f4bbe751ca.tar.gz |
Remove code used by ez-ipupdate, it is now obsolete.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/services.inc | 89 |
1 files changed, 2 insertions, 87 deletions
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 = <<<EOD -service-type={$dyndns['type']} -user={$dyndns['username']}:{$dyndns['password']} -host={$dyndns['host']} -interface={$if} -max-interval=2073600 -pid-file={$g['varrun_path']}/ez-ipupdate_{$if}.pid -cache-file={$g['vardb_path']}/ez-ipupdate_{$if}.cache -daemon - -EOD; - - /* enable server[:port]? */ - if ($dyndns['server']) { - if ($dyndns['port']) - $ezipupdateconf .= "server={$dyndns['server']}:{$dyndns['port']}\n"; - else - $ezipupdateconf .= "server={$dyndns['server']}\n"; - } - - /* enable MX? */ - if ($dyndns['mx']) { - $ezipupdateconf .= "mx={$dyndns['mx']}\n"; - } - - /* enable wildcards? */ - if (isset($dyndns['wildcard'])) { - $ezipupdateconf .= "wildcard\n"; - } - - fwrite($fd, $ezipupdateconf); - fclose($fd); - - /* run ez-ipupdate */ - mwexec("/usr/local/bin/ez-ipupdate -c {$g['varetc_path']}/ez-ipupdate_{$if}.conf"); - - if ($g['booting']) - echo "done\n"; - - return 0; -} - function services_dnsmasq_configure() { global $config, $g; $return = 0; |