summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-26 22:02:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-26 22:02:56 +0000
commit5e2f59edf2c911526943036f177b8573aa6cfcba (patch)
treefd32236b28ad7fb85b2aca3d29fdbb6536db806e /etc
parent2fc0b1c7df46119e18fdf68d490cb896790d83e0 (diff)
downloadpfsense-5e2f59edf2c911526943036f177b8573aa6cfcba.zip
pfsense-5e2f59edf2c911526943036f177b8573aa6cfcba.tar.gz
Disable phpDynDns and revert back to ez-ipupdate due to a number of reasons:
* Author has decided to unsubscribe from the lists therefore the item will not be supported properly * Item has not been tested enough. Simply putting in the wrong username / password combonitations doesn't even result in a invalid username or password error * We are too close to release to have these repeated issues * After repeated attempts to correct code, major issues still exist (like breaking internet access when combined with pppoe)
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc169
1 files changed, 58 insertions, 111 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index b6f9275..38c3670 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -366,104 +366,52 @@ function services_dhcrelay_configure() {
function services_dyndns_reset() {
global $config, $g;
- if(isset($config['system']['developerspew'])) {
- $mt = microtime();
- echo "services_dyndns_reset() being called $mt\n";
- }
if (file_exists("{$g['vardb_path']}/ez-ipupdate.cache")) {
unlink("{$g['vardb_path']}/ez-ipupdate.cache");
- }
-
+ }
+
if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) {
conf_mount_rw();
unlink("{$g['conf_path']}/ez-ipupdate.cache");
conf_mount_ro();
}
-
+
return 0;
}
function services_dyndns_configure() {
global $config, $g;
- if(isset($config['system']['developerspew'])) {
- $mt = microtime();
- echo "services_dyndns_configure() being called $mt\n";
- }
-
+
+ /* kill any running ez-ipupdate */
+ /* ez-ipupdate needs SIGQUIT instead of SIGTERM */
+ sigkillbypid("{$g['varrun_path']}/ez-ipupdate.pid", "QUIT");
+
$dyndnscfg = $config['dyndns'];
$wancfg = $config['interfaces']['wan'];
-
+
if (isset($dyndnscfg['enable'])) {
-
- if ($g['booting']) {
+
+ if ($g['booting'])
echo "Starting DynDNS client... ";
- if($config['system']['use_old_dyndns'] <> "") {
- echo " [Using ez-ipupdate] ";
- services_dyndns_configure_old();
- return;
- }
- } else {
+ else
sleep(1);
- if($config['system']['use_old_dyndns'] <> "") {
- services_dyndns_configure_old();
- return;
- }
- }
- /* load up the dyndns.class */
- require_once("dyndns.class");
-
- $dns = new updatedns($dnsService = $config['dyndns']['type'],
- $dnsHost = $config['dyndns']['host'],
- $dnsUser = $config['dyndns']['username'],
- $dnsPass = $config['dyndns']['password'],
- $dnsWilcard = $config['dyndns']['wildcard'],
- $dnsMX = $config['dyndns']['mx']);
-
- if ($g['booting'])
- echo "done.\n";
- }
-
- return 0;
-}
-
-function services_dyndns_configure_old() {
- 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.pid", "QUIT");
-
- $dyndnscfg = $config['dyndns'];
- $wancfg = $config['interfaces']['wan'];
-
- if (isset($dyndnscfg['enable'])) {
-
- if ($g['booting'])
- echo "Starting DynDNS client... ";
- else
- sleep(1);
-
- /* determine WAN interface name */
- $wanif = get_real_wan_interface();
-
- /* write ez-ipupdate.conf */
- $fd = fopen("{$g['varetc_path']}/ez-ipupdate.conf", "w");
- if (!$fd) {
- printf("Error: cannot open ez-ipupdate.conf in services_dyndns_configure().\n");
- return 1;
- }
-
- $ezipupdateconf = <<<EOD
+ /* determine WAN interface name */
+ $wanif = get_real_wan_interface();
+
+ /* write ez-ipupdate.conf */
+ $fd = fopen("{$g['varetc_path']}/ez-ipupdate.conf", "w");
+ if (!$fd) {
+ printf("Error: cannot open ez-ipupdate.conf in services_dyndns_configure().\n");
+ return 1;
+ }
+
+ $ezipupdateconf = <<<EOD
service-type={$dyndnscfg['type']}
user={$dyndnscfg['username']}:{$dyndnscfg['password']}
host={$dyndnscfg['host']}
-interface={$wanif}
+interface=$wanif
max-interval=2073600
pid-file={$g['varrun_path']}/ez-ipupdate.pid
cache-file={$g['vardb_path']}/ez-ipupdate.cache
@@ -472,45 +420,44 @@ daemon
EOD;
- /* enable server[:port]? */
- if ($dyndnscfg['server']) {
- if ($dyndnscfg['port'])
- $ezipupdateconf .= "server={$dyndnscfg['server']}:{$dyndnscfg['port']}\n";
- else
- $ezipupdateconf .= "server={$dyndnscfg['server']}\n";
- }
-
- /* enable MX? */
- if ($dyndnscfg['mx']) {
- $ezipupdateconf .= "mx={$dyndnscfg['mx']}\n";
- }
-
- /* enable wildcards? */
- if (isset($dyndnscfg['wildcard'])) {
- $ezipupdateconf .= "wildcard\n";
- }
-
- fwrite($fd, $ezipupdateconf);
- fclose($fd);
-
- /* if we're booting, copy the cache file from /conf */
- if ($g['booting']) {
- if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) {
- copy("{$g['conf_path']}/ez-ipupdate.cache", "{$g['vardb_path']}/ez-ipupdate.cache");
- }
- }
-
- /* run ez-ipupdate */
- mwexec("/usr/local/bin/ez-ipupdate -c {$g['varetc_path']}/ez-ipupdate.conf");
+ /* enable server[:port]? */
+ if ($dyndnscfg['server']) {
+ if ($dyndnscfg['port'])
+ $ezipupdateconf .= "server={$dyndnscfg['server']}:{$dyndnscfg['port']}\n";
+ else
+ $ezipupdateconf .= "server={$dyndnscfg['server']}\n";
+ }
- if ($g['booting'])
- echo "done\n";
- }
+ /* enable MX? */
+ if ($dyndnscfg['mx']) {
+ $ezipupdateconf .= "mx={$dyndnscfg['mx']}\n";
+ }
+
+ /* enable wildcards? */
+ if (isset($dyndnscfg['wildcard'])) {
+ $ezipupdateconf .= "wildcard\n";
+ }
- return 0;
+ fwrite($fd, $ezipupdateconf);
+ fclose($fd);
+
+ /* if we're booting, copy the cache file from /conf */
+ if ($g['booting']) {
+ if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) {
+ copy("{$g['conf_path']}/ez-ipupdate.cache", "{$g['vardb_path']}/ez-ipupdate.cache");
+ }
+ }
+
+ /* run ez-ipupdate */
+ mwexec("/usr/local/bin/ez-ipupdate -c {$g['varetc_path']}/ez-ipupdate.conf");
+
+ if ($g['booting'])
+ echo "done\n";
+ }
+
+ return 0;
}
-
function services_dnsmasq_configure() {
global $config, $g;
if(isset($config['system']['developerspew'])) {
OpenPOWER on IntegriCloud