summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-11 11:42:41 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-11 11:42:41 +0000
commit0be93267a678021ab9c5de04be0976e83cd17011 (patch)
treea9fd29a05aeb300a9eb039fb45288880dcd4f94a /etc
parentbe620dfd9283ee644c57b3c558c7dd603d0f4897 (diff)
downloadpfsense-0be93267a678021ab9c5de04be0976e83cd17011.zip
pfsense-0be93267a678021ab9c5de04be0976e83cd17011.tar.gz
Touch up some comments and error messages. Teach dydns_configure to update only one interface.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc8
-rwxr-xr-xetc/rc.newwanip10
2 files changed, 12 insertions, 6 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 19bc5cc..ebf60f9 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -577,7 +577,7 @@ function services_dyndns_configure_client($conf) {
}
-function services_dyndns_configure() {
+function services_dyndns_configure($int = "") {
global $config, $g;
if(isset($config['system']['developerspew'])) {
$mt = microtime();
@@ -594,9 +594,15 @@ function services_dyndns_configure() {
if (!isset($dyndns['enable']))
continue;
+ if (!empty($int) && $int != $dyndns['interface'])
+ continue;
+
services_dyndns_configure_client($dyndns);
sleep(1);
+
+ if (!empty($int))
+ break;
}
if ($g['booting'])
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 6ea7554..db381bd 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -38,7 +38,7 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
-/* WAN IP address has changed */
+/* Interface IP address has changed */
$argument = str_replace("\n", "", $argv[1]);
@@ -72,7 +72,7 @@ if($old_ip) {
if($helpers)
mwexec("kill " . trim($helpers));
} else {
- log_error("WARNING! /etc/rc.newwanip could not determine the previous IP address ( $interface_real ).");
+ log_error("WARNING! /etc/rc.newwanip could not determine the previous IP address of {$interface}( {$interface_real} ).");
}
/* reconfigure IPsec tunnels */
@@ -95,9 +95,9 @@ if ($fd) {
fclose($fd);
}
-log_error("Informational: DHClient spawned /etc/rc.newwanip and the new ip is {$interface} - {$curwanip}.");
+log_error("Informational: DHClient spawned /etc/rc.newwanip for interface {$interface} with new ip {$curwanip}.");
-touch("/tmp/update_dyndns");
+file_put_contents("/tmp/update_dyndns", $interface);
/* signal filter reload */
unlink_if_exists("/tmp/config.cache");
@@ -122,4 +122,4 @@ if($old_ip <> "") {
setup_gateways_monitor();
return 0;
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud