summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-11-28 16:47:17 -0500
committersullrich <sullrich@pfsense.org>2009-11-28 16:47:17 -0500
commit9c38bceaf7aca08e01e94dd9be6df11d9f5d79ef (patch)
tree3c3344dedeb3d5cdc23e946f34db51a40d6c8152
parentd74b5b8b1d18da030e7feb9d3d3d22ce9d85211b (diff)
downloadpfsense-9c38bceaf7aca08e01e94dd9be6df11d9f5d79ef.zip
pfsense-9c38bceaf7aca08e01e94dd9be6df11d9f5d79ef.tar.gz
Do not dedicate 16 characters to interface name
-rw-r--r--etc/inc/config.lib.inc2
-rw-r--r--etc/inc/services.inc19
-rw-r--r--usr/local/www/services_dyndns_edit.php6
3 files changed, 14 insertions, 13 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index d6b0b00..a2e841b 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -662,7 +662,7 @@ EOD;
$iflist = array();
} else {
foreach ($iflist as $iface => $ifa) {
- echo sprintf("% -16s%s%s\t%s\n", $iface, $ifa['mac'],
+ echo sprintf("% -5s%s%s\t%s\n", $iface, $ifa['mac'],
$ifa['up'] ? " (up)" : " (down)", $ifa['dmesg']);
}
}
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 3969efa..ca5fa84 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -538,19 +538,19 @@ function services_dyndns_reset($interface = "wan" ) {
$dyndnscfg = $config['dyndnses']['dyndns'];
- if (is_array($dyndnscfg)) {
- foreach ($dyndnscfg as $dyndns) {
- if (!isset($dyndns['enable']))
- continue;
+ if (is_array($dyndnscfg)) {
+ foreach ($dyndnscfg as $dyndns) {
+ if (!isset($dyndns['enable']))
+ continue;
if ($dyndns['interface'] != $interface)
continue;
- services_dyndns_configure_client($dyndns);
+ services_dyndns_configure_client($dyndns);
- sleep(1);
- }
+ sleep(1);
+ }
- }
+ }
return 0;
}
@@ -567,7 +567,8 @@ function services_dyndns_configure_client($conf) {
$dnsUser = $conf['username'],
$dnsPass = $conf['password'],
$dnsWilcard = $conf['wildcard'],
- $dnsMX = $conf['mx'], $dnsIf = "{$conf['interface']}");
+ $dnsMX = $conf['mx'],
+ $dnsIf = "{$conf['interface']}");
}
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index 1dbadc0..12df1d5 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -109,16 +109,16 @@ if ($_POST) {
write_config();
-
- /* XXX: Make this with a touch file */
$retval = 0;
conf_mount_rw();
+
mwexec("/bin/rm {$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}.cache");
- conf_mount_ro();
$retval = services_dyndns_configure_client($dyndns);
+ conf_mount_ro();
+
header("Location: services_dyndns.php");
exit;
}
OpenPOWER on IntegriCloud