Skip to content

Commit

Permalink
dynamic dns: consolidate naming away from DDNS or DynDNS
Browse files Browse the repository at this point in the history
Contractions should be avoided whenever possible.
  • Loading branch information
fichtner committed Sep 12, 2015
1 parent ae001c0 commit 27e5ef1
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 185 deletions.
340 changes: 170 additions & 170 deletions src/etc/inc/dyndns.class

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions src/etc/inc/services.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ function services_dyndns_configure($int = '')
$gwgroups = return_gateway_groups_array();
if (is_array($dyndnscfg)) {
if (file_exists("/var/run/booting"))
echo gettext("Starting DynDNS clients...");
echo gettext("Starting dynamic DNS clients...");

foreach ($dyndnscfg as $dyndns) {
if ((empty($int)) || ($int == $dyndns['interface']) || (is_array($gwgroups[$dyndns['interface']]))) {
Expand Down Expand Up @@ -2250,12 +2250,12 @@ EOD;
if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) {
$upinst .= "update delete {$dnsupdate['host']}. A\n";
$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n";
$notify_text .= sprintf(gettext('DynDNS updated IP Address (A) for %s on %s (%s) to %s'), $dnsupdate['host'], convert_real_interface_to_friendly_descr($if), $if, $wanip) . "\n";
$notify_text .= sprintf(gettext('Dynamic DNS updated IP Address (A) for %s on %s (%s) to %s'), $dnsupdate['host'], convert_real_interface_to_friendly_descr($if), $if, $wanip) . "\n";
@file_put_contents($cacheFile, "{$wanip}|{$currentTime}");
log_error("phpDynDNS: updating cache file {$cacheFile}: {$wanip}");
log_error("Dynamic DNS: updating cache file {$cacheFile}: {$wanip}");
$need_update = true;
} else {
log_error("phpDynDNS: Not updating {$dnsupdate['host']} A record because the IP address has not changed.");
log_error("Dynamic DNS: Not updating {$dnsupdate['host']} A record because the IP address has not changed.");
}
} else
@unlink($cacheFile);
Expand All @@ -2265,12 +2265,12 @@ EOD;
if (($wanipv6 != $cachedipv6) || (($currentTime - $cacheTimev6) > $maxCacheAgeSecs) || $forced) {
$upinst .= "update delete {$dnsupdate['host']}. AAAA\n";
$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} AAAA {$wanipv6}\n";
$notify_text .= sprintf(gettext('DynDNS updated IPv6 Address (AAAA) for %s on %s (%s) to %s'), $dnsupdate['host'], convert_real_interface_to_friendly_descr($if), $if, $wanipv6) . "\n";
$notify_text .= sprintf(gettext('Dynamic DNS updated IPv6 Address (AAAA) for %s on %s (%s) to %s'), $dnsupdate['host'], convert_real_interface_to_friendly_descr($if), $if, $wanipv6) . "\n";
@file_put_contents("{$cacheFile}.ipv6", "{$wanipv6}|{$currentTime}");
log_error("phpDynDNS: updating cache file {$cacheFile}.ipv6: {$wanipv6}");
log_error("Dynamic DNS: updating cache file {$cacheFile}.ipv6: {$wanipv6}");
$need_update = true;
} else {
log_error("phpDynDNS: Not updating {$dnsupdate['host']} AAAA record because the IPv6 address has not changed.");
log_error("Dynamic DNS: Not updating {$dnsupdate['host']} AAAA record because the IPv6 address has not changed.");
}
} else
@unlink("{$cacheFile}.ipv6");
Expand Down
9 changes: 8 additions & 1 deletion src/www/interfaces_gif.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ function gif_inuse($num) {
</strong></span>
<?=gettext("GIF tunnels are configured here."); ?>
<br /><br />
<?php echo gettext("If you are using a GIF tunnel to connect to a Hurricane Electric (he.net) Tunnel Broker on a WAN with a dynamic IP, you may want to add a"); ?> <a href="services_dyndns.php"><?php echo gettext("HE.net Tunnelbroker type DynDNS Entry"); ?></a> <?php echo gettext("to keep your tunnel functional when your IP changes."); ?></p>
<?=sprintf(gettext(
'If you are using a GIF tunnel to connect to a Hurricane Electric (he.net) Tunnel Broker ' .
'on a WAN with a dynamic IP, you may want to add a %sHE.net Tunnelbroker dynamic DNS entry%s ' .
'to keep your tunnel functional when your IP changes.',
'<a href="services_dyndns.php">',
'</a>'
));
?></p>
</div>

</form>
Expand Down
6 changes: 3 additions & 3 deletions src/www/services_dyndns_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
require_once("services.inc") ;
require_once("interfaces.inc");

/* returns true if $uname is a valid DynDNS username */
/* returns true if $uname is a valid dynamic DNS username */
function is_dyndns_username($uname) {
if (!is_string($uname))
return false;
Expand Down Expand Up @@ -335,7 +335,7 @@ function _onTypeChange(type){
<td width="78%" class="vtable">
<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
<br />
<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
<?=gettext("Note: With a dynamic DNS service you can only use a hostname, not an IP address.");?>
<br />
<?=gettext("Set this option only if you need a special MX record. Not".
" all services support this.");?></td>
Expand Down Expand Up @@ -404,7 +404,7 @@ function _onTypeChange(type){
<textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea>
<br /><?= gettext("This field is only used by Custom Dynamic DNS Entries.");?>
<br />
<?= gettext("This field should be identical to what your DDNS Provider will return if the update succeeds, leave it blank to disable checking of returned results.");?>
<?= gettext("This field should be identical to what your dynamic DNS Provider will return if the update succeeds, leave it blank to disable checking of returned results.");?>
<br />
<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
<br />
Expand Down
6 changes: 3 additions & 3 deletions src/www/vpn_openvpn_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -653,13 +653,13 @@ function useproxy_changed(obj) {
<select name="useaddr" id="useaddr" class="formselect" onchange="useaddr_changed(this)">
<option value="serveraddr" ><?=gettext("Interface IP Address");?></option>
<option value="servermagic" ><?=gettext("Automagic Multi-WAN IPs (port forward targets)");?></option>
<option value="servermagichost" ><?=gettext("Automagic Multi-WAN DDNS Hostnames (port forward targets)");?></option>
<option value="servermagichost" ><?=gettext("Automagic Multi-WAN dynamic DNS Hostnames (port forward targets)");?></option>
<option value="serverhostname" ><?=gettext("Installation hostname");?></option>
<?php if (isset($config['dyndnses']['dyndns'])) :
?>
<?php foreach ($config['dyndnses']['dyndns'] as $ddns) :
?>
<option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");
<option value="<?php echo $ddns["host"] ?>"><?=gettext("Dynamic DNS");
?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php
endforeach; ?>
Expand All @@ -669,7 +669,7 @@ function useproxy_changed(obj) {
?>
<?php foreach ($config['dnsupdates']['dnsupdate'] as $ddns) :
?>
<option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");
<option value="<?php echo $ddns["host"] ?>"><?=gettext("Dynamic DNS");
?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php
endforeach; ?>
Expand Down
2 changes: 1 addition & 1 deletion src/www/vpn_openvpn_export_shared.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function useproxy_changed(obj) {
<?php foreach ($config['dyndnses']['dyndns'] as $ddns) :
?>
<option value="<?= htmlspecialchars($ddns["host"]);
?>"><?=gettext("DynDNS:");
?>"><?=gettext("Dynamic DNS:");
?> <?= htmlspecialchars($ddns["host"]);?></option>
<?php
endforeach; ?>
Expand Down

0 comments on commit 27e5ef1

Please sign in to comment.