summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ovpn_auth_verify7
-rw-r--r--usr/local/www/load_balancer_monitor.php6
-rw-r--r--usr/local/www/load_balancer_monitor_edit.php43
-rw-r--r--usr/local/www/load_balancer_setting.php13
-rw-r--r--usr/local/www/load_balancer_virtual_server.php6
-rw-r--r--usr/local/www/load_balancer_virtual_server_edit.php35
-rw-r--r--usr/local/www/services_dnsmasq.php4
-rw-r--r--usr/local/www/services_ntpd.php68
-rw-r--r--usr/local/www/services_ntpd_gps.php88
-rw-r--r--usr/local/www/services_unbound.php2
-rw-r--r--usr/local/www/system.php2
11 files changed, 143 insertions, 131 deletions
diff --git a/usr/local/sbin/ovpn_auth_verify b/usr/local/sbin/ovpn_auth_verify
index 81aa08e..d9ffb15 100755
--- a/usr/local/sbin/ovpn_auth_verify
+++ b/usr/local/sbin/ovpn_auth_verify
@@ -1,10 +1,11 @@
#!/bin/sh
if [ "$1" = "tls" ]; then
- RESULT = $(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.tls-verify.php -d "servercn=$2&depth=$3&certsubject=$4&certdepth=$5")
+ RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.tls-verify.php -d "servercn=$2&depth=$3&certdepth=$4&certsubject=$5")
else
- password = $(echo '$password' | /usr/bin/sed 's/&/%26/g')
- RESULT = $(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.auth-user.php -d "username=$username&password=$password&cn=$common_name&strictcn=$3&authcfg=$2&modeid=$4")
+ # Single quoting $password breaks getting the value from the variable.
+ password=$(echo ${password} | /usr/bin/sed 's/&/%26/g')
+ RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.auth-user.php -d "username=$username&password=$password&cn=$common_name&strictcn=$3&authcfg=$2&modeid=$4")
fi
if [ "${RESULT}" = "OK" ]; then
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index bcddec3..79f06ee 100644
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -96,10 +96,10 @@ include("head.inc");
<form action="load_balancer_monitor.php" method="post">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
+<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="load balancer monitor">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
@@ -114,7 +114,7 @@ include("head.inc");
<tr>
<td>
<div id="mainarea">
-<?
+<?php
$t = new MainTable();
$t->edit_uri('load_balancer_monitor_edit.php');
$t->my_uri('load_balancer_monitor.php');
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php
index 01fcb54..9629002 100644
--- a/usr/local/www/load_balancer_monitor_edit.php
+++ b/usr/local/www/load_balancer_monitor_edit.php
@@ -199,8 +199,9 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-
+<?php include("fbegin.inc"); ?>
<script type="text/javascript">
+//<![CDATA[
function updateType(t){
switch(t) {
<?php
@@ -219,26 +220,26 @@ function updateType(t){
}
jQuery('#' + t).show();
}
+//]]>
</script>
-<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="monitor entry">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Monitor entry"); ?></td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="16" maxlength="16">
+ <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="16" maxlength="16" />
</td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?>size="64">
+ <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?> size="64" />
</td>
</tr>
<tr align="left">
@@ -248,7 +249,7 @@ function updateType(t){
<?
foreach ($types as $key => $val) {
if(isset($pconfig['type']) && $pconfig['type'] == $key) {
- $selected = " selected";
+ $selected = " selected=\"selected\"";
} else {
$selected = "";
}
@@ -258,26 +259,26 @@ function updateType(t){
</select>
</td>
</tr>
- <tr align="left" id="icmp"<?= $pconfig['type'] == "icmp" ? "" : " style=\"display:none;\""?>>
+ <tr align="left" id="icmp"<?= $pconfig['type'] == "icmp" ? "" : " style=\"display:none;\""?>><td></td>
</tr>
- <tr align="left" id="tcp"<?= $pconfig['type'] == "tcp" ? "" : " style=\"display:none;\""?>>
+ <tr align="left" id="tcp"<?= $pconfig['type'] == "tcp" ? "" : " style=\"display:none;\""?>><td></td>
</tr>
<tr align="left" id="http"<?= $pconfig['type'] == "http" ? "" : " style=\"display:none;\""?>>
<td width="22%" valign="top" class="vncellreq"><?=gettext("HTTP"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="http">
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
- <input name="http_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"" . htmlspecialchars($pconfig['options']['path']) . "\"";?>size="64">
+ <input name="http_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"" . htmlspecialchars($pconfig['options']['path']) . "\"";?> size="64" />
</td>
</tr>
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"" . htmlspecialchars($pconfig['options']['host']) . "\"";?>size="64"><br /><?=gettext("Hostname for Host: header if needed."); ?>
+ <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"" . htmlspecialchars($pconfig['options']['host']) . "\"";?> size="64" /><br /><?=gettext("Hostname for Host: header if needed."); ?>
</td>
- </td>
+ </tr>
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
@@ -298,19 +299,19 @@ function updateType(t){
<tr align="left" id="https"<?= $pconfig['type'] == "https" ? "" : " style=\"display:none;\""?>>
<td width="22%" valign="top" class="vncellreq"><?=gettext("HTTPS"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="https">
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
- <input name="https_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"" . htmlspecialchars($pconfig['options']['path']) ."\"";?>size="64">
+ <input name="https_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"" . htmlspecialchars($pconfig['options']['path']) ."\"";?> size="64" />
</td>
</tr>
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"" . htmlspecialchars($pconfig['options']['host']) . "\"";?>size="64"><br /><?=gettext("Hostname for Host: header if needed."); ?>
+ <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"" . htmlspecialchars($pconfig['options']['host']) . "\"";?> size="64" /><br /><?=gettext("Hostname for Host: header if needed."); ?>
</td>
- </td>
+ </tr>
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
@@ -332,17 +333,17 @@ function updateType(t){
<tr align="left" id="send"<?= $pconfig['type'] == "send" ? "" : " style=\"display:none;\""?>>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Send/Expect"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="send expect">
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Send string"); ?></td>
<td class="vtable" colspan="2">
- <input name="send_options_send" type="text" <?if(isset($pconfig['options']['send'])) echo "value=\"" . htmlspecialchars($pconfig['options']['send']) . "\"";?>size="64">
+ <input name="send_options_send" type="text" <?if(isset($pconfig['options']['send'])) echo "value=\"" . htmlspecialchars($pconfig['options']['send']) . "\"";?> size="64" />
</td>
</tr>
<tr align="left">
<td valign="top" align="right" class="vtable"><?=gettext("Expect string"); ?></td>
<td class="vtable" colspan="2">
- <input name="send_options_expect" type="text" <?if(isset($pconfig['options']['expect'])) echo "value=\"" . htmlspecialchars($pconfig['options']['expect']) . "\"";?>size="64">
+ <input name="send_options_expect" type="text" <?if(isset($pconfig['options']['expect'])) echo "value=\"" . htmlspecialchars($pconfig['options']['expect']) . "\"";?> size="64" />
</td>
</tr>
</table>
@@ -351,9 +352,9 @@ function updateType(t){
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_monitor[$id]): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
</td>
</tr>
diff --git a/usr/local/www/load_balancer_setting.php b/usr/local/www/load_balancer_setting.php
index eeabf72..25fe47c 100644
--- a/usr/local/www/load_balancer_setting.php
+++ b/usr/local/www/load_balancer_setting.php
@@ -106,10 +106,10 @@ include("head.inc");
<form action="load_balancer_setting.php" method="post">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
+<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="load balancer settings">
<tr>
<td class="tabnavtbl">
<?php
@@ -126,14 +126,14 @@ include("head.inc");
<tr>
<td id="mainarea">
<div class="tabcont">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Relayd global settings"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("timeout") ; ?></td>
<td width="78%" class="vtable">
- <input name="timeout" id="timeout" value="<?php if ($lbsetting['timeout'] <> "") echo $lbsetting['timeout']; ?>" class="formfld unknown">
+ <input name="timeout" id="timeout" value="<?php if ($lbsetting['timeout'] <> "") echo $lbsetting['timeout']; ?>" class="formfld unknown" />
<br />
<?=gettext("Set the global timeout in milliseconds for checks. Leave blank to use the default value of 1000 ms "); ?>
</td>
@@ -141,7 +141,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("interval") ; ?></td>
<td width="78%" class="vtable">
- <input name="interval" id="interval" value="<?php if ($lbsetting['interval'] <> "") echo $lbsetting['interval']; ?>" class="formfld unknown">
+ <input name="interval" id="interval" value="<?php if ($lbsetting['interval'] <> "") echo $lbsetting['interval']; ?>" class="formfld unknown" />
<br />
<?=gettext("Set the interval in seconds at which the member of a pool will be checked. Leave blank to use the default interval of 10 seconds"); ?>
</td>
@@ -149,7 +149,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("prefork") ; ?></td>
<td width="78%" class="vtable">
- <input name="prefork" id="prefork" value="<?php if ($lbsetting['prefork'] <> "") echo $lbsetting['prefork']; ?>" class="formfld unknown">
+ <input name="prefork" id="prefork" value="<?php if ($lbsetting['prefork'] <> "") echo $lbsetting['prefork']; ?>" class="formfld unknown" />
<br />
<?=gettext("Number of processes used by relayd for dns protocol. Leave blank to use the default value of 5 processes"); ?>
</td>
@@ -162,6 +162,7 @@ include("head.inc");
</tr>
</table>
</div>
+ </td>
</tr>
</table>
</form>
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 4a2ba58..c319408 100644
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -105,10 +105,10 @@ include("head.inc");
<form action="load_balancer_virtual_server.php" method="post">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
+<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="load balancer virtual server">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
@@ -123,7 +123,7 @@ include("head.inc");
<tr>
<td>
<div id="mainarea">
-<?
+<?php
$t = new MainTable();
$t->edit_uri('load_balancer_virtual_server_edit.php');
$t->my_uri('load_balancer_virtual_server.php');
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 6066c4d..d2136e7 100644
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -148,32 +148,32 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/autosuggest.js"></script>
<script type="text/javascript" src="/javascript/suggestions.js"></script>
-<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="load balancer server entry">
<tr>
<td colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?>size="32" maxlength="32">
+ <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="32" maxlength="32" />
</td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?>size="64">
+ <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?> size="64" />
</td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39">
+ <input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39" />
<br /><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster."); ?>
<br /><?=gettext("You may also specify a host alias listed in Firewall -&gt; Aliases here."); ?>
<script type="text/javascript">
@@ -187,7 +187,7 @@ include("head.inc");
<tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16">
+ <input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16" />
<br /><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster."); ?>
<br /><?=gettext("If left blank, listening ports from the pool will be used."); ?>
<br /><?=gettext("You may also specify a port alias listed in Firewall -&gt; Aliases here."); ?>
@@ -210,12 +210,12 @@ include("head.inc");
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['poolname'] )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
?>
- <?php endif; ?>
</select>
+ <?php endif; ?>
</td>
</tr>
<tr align="left">
@@ -230,7 +230,7 @@ include("head.inc");
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['sitedown'] )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
?>
@@ -240,13 +240,13 @@ include("head.inc");
<?php endif; ?>
</td>
</tr>
- <input type="hidden" name="mode" value="redirect_mode">
+ <tr style="display:none;"><td><input type="hidden" name="mode" value="redirect_mode" /></td></tr>
<!--
<tr align="left">
<td width="22%" valign="top" class="vncellreq">Mode</td>
<td width="78%" class="vtable" colspan="2">
- <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?>> Redirect
- <input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?>> Relay
+ <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?> /> Redirect
+ <input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?> /> Relay
<br />
</td>
@@ -261,7 +261,7 @@ include("head.inc");
foreach ($lb_def_protos as $lb_proto) {
$selected = "";
if ( $pconfig['relay_protocol'] == $lb_proto )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"{$lb_proto}\"{$selected}>{$lb_proto}</option>";
}
?>
@@ -270,11 +270,12 @@ include("head.inc");
</td>
</tr>
<tr align="left">
- <td align="left" valign="bottom">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
- <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ <td width="22%" valign="top">&nbsp;</td>
+ <td align="left" valign="bottom" width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" />
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
</td>
</tr>
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 75c1a8e..3758e67 100644
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -116,6 +116,8 @@ if ($_POST) {
// Relaod filter (we might need to sync to CARP hosts)
filter_configure();
+ /* Update resolv.conf in case the interface bindings exclude localhost. */
+ system_resolvconf_generate();
if ($retval == 0)
clear_subsystem_dirty('hosts');
@@ -424,7 +426,7 @@ function show_advanced_dns() {
<td colspan="5" valign="top" class="listtopic"><?=gettext("Domain Overrides");?></td>
</tr>
<tr>
- <td><p><?=gettext("Entries in this area override an entire domain by specifying an".
+ <td><p><?=gettext("Entries in this area override an entire domain, and subdomains, by specifying an".
" authoritative DNS server to be queried for that domain.");?></p></td>
</tr>
</table>
diff --git a/usr/local/www/services_ntpd.php b/usr/local/www/services_ntpd.php
index 4012ed9..f3b8c72 100644
--- a/usr/local/www/services_ntpd.php
+++ b/usr/local/www/services_ntpd.php
@@ -168,7 +168,7 @@ if ($_POST) {
}
}
-
+$closehead = false;
$pconfig = &$config['ntpd'];
$pgtitle = array(gettext("Services"),gettext("NTP"));
$shortcut_section = "ntp";
@@ -177,7 +177,7 @@ include("head.inc");
?>
<script type="text/javascript">
-
+//<![CDATA[
//Generic show an advanced option function
function show_advanced(showboxID, configvalueID) {
document.getElementById(showboxID).innerHTML='';
@@ -204,7 +204,7 @@ include("head.inc");
//then revise the add another server line
if (add < 9) {
var next = add + 1;
- var newdiv = '<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" OnClick="NewTimeServer(' + next + ')">\n';
+ var newdiv = '<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(' + next + ')" alt="add" />\n';
document.getElementById('addserver').innerHTML=newdiv;
}else{
document.getElementById('addserver').style.display = 'none';
@@ -212,9 +212,9 @@ include("head.inc");
}
}
}
-
+//]]>
</script>
-
+</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
@@ -222,7 +222,7 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="ntpd">
<tr>
<td>
<?php
@@ -237,7 +237,7 @@ include("head.inc");
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("NTP Server Configuration"); ?></td>
</tr>
@@ -254,7 +254,7 @@ include("head.inc");
$interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
$size = (count($interfaces) < 10) ? count($interfaces) : 10;
?>
- <select id="interface" name="interface[]" multiple="true" class="formselect" size="<?php echo $size; ?>">
+ <select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?php echo $size; ?>">
<?php
foreach ($interfaces as $iface => $ifacename) {
if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface))
@@ -286,17 +286,17 @@ include("head.inc");
}
echo ">\n";
- echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeservers[$i]}\" type=\"text\">&emsp;";
- echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" OnClick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\"";
- if (substr_count($config['ntpd']['prefer'], $timeservers[$i])) echo ' checked';
- echo '>&nbsp;prefer&emsp;';
- echo "\n<input name=\"servselect{$i}\" class=\"formcheckbox\" id=\"servselect{$i}\" OnClick=\"CheckOffOther('servselect{$i}', 'servprefer{$i}')\" type=\"checkbox\"";
- if (substr_count($config['ntpd']['noselect'], $timeservers[$i])) echo ' checked';
- echo ">&nbsp;noselect\n<br />\n</div>\n";
+ echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeservers[$i]}\" type=\"text\" />&emsp;";
+ echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" onclick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\"";
+ if (substr_count($config['ntpd']['prefer'], $timeservers[$i])) echo " checked=\"checked\"";
+ echo " />&nbsp;prefer&emsp;";
+ echo "\n<input name=\"servselect{$i}\" class=\"formcheckbox\" id=\"servselect{$i}\" onclick=\"CheckOffOther('servselect{$i}', 'servprefer{$i}')\" type=\"checkbox\"";
+ if (substr_count($config['ntpd']['noselect'], $timeservers[$i])) echo " checked=\"checked\"";
+ echo " />&nbsp;noselect\n<br />\n</div>\n";
}
?>
<div id="addserver">
- <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" OnClick="NewTimeServer(<?php echo $j;?>)">
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(<?php echo $j;?>)" alt="add" />
</div>
<br />
<?php echo gettext('For best results three to five servers should be configured here.'); ?>
@@ -309,14 +309,14 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq">Orphan mode</td>
<td width="78%" class="vtable">
- <input name="ntporphan" type="text" class="formfld unknown" id="ntporphan" min="1" max="16" size="20" value="<?=htmlspecialchars($pconfig['orphan']);?>"><?php echo gettext("(0-15)");?><br />
+ <input name="ntporphan" type="text" class="formfld unknown" id="ntporphan" min="1" max="16" size="20" value="<?=htmlspecialchars($pconfig['orphan']);?>" /><?php echo gettext("(0-15)");?><br />
<?php echo gettext("Orphan mode allows the system clock to be used when no other clocks are available. The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough to insure that any other servers available to clients are preferred over this server. (default: 12)."); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">NTP graphs</td>
<td width="78%" class="vtable">
- <input name="statsgraph" type="checkbox" class="formcheckbox" id="statsgraph" <?php if($pconfig['statsgraph']) echo ' checked'; ?>>
+ <input name="statsgraph" type="checkbox" class="formcheckbox" id="statsgraph" <?php if($pconfig['statsgraph']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable rrd graphs of NTP statistics (default: disabled)."); ?>
</td>
</tr>
@@ -325,10 +325,10 @@ include("head.inc");
<td width="78%" class="vtable">
<?php echo gettext("These options enable additional messages from NTP to be written to the System Log");?> (<a href="diag_logs_ntpd.php"><?php echo gettext("Status > System Logs > NTP"); ?></a>).
<br /><br />
- <input name="logpeer" type="checkbox" class="formcheckbox" id="logpeer"<?php if($pconfig['logpeer']) echo ' checked'; ?>>
+ <input name="logpeer" type="checkbox" class="formcheckbox" id="logpeer"<?php if($pconfig['logpeer']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of peer messages (default: disabled)."); ?>
<br />
- <input name="logsys" type="checkbox" class="formcheckbox" id="logsys"<?php if($pconfig['logsys']) echo ' checked'; ?>>
+ <input name="logsys" type="checkbox" class="formcheckbox" id="logsys"<?php if($pconfig['logsys']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of system messages (default: disabled)."); ?>
</td>
</tr>
@@ -336,18 +336,18 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq">Statistics logging</td>
<td width="78%" class="vtable">
<div id="showstatisticsbox">
- <input type="button" onClick="show_advanced('showstatisticsbox', 'showstatistics')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?></a>
+ <input type="button" onclick="show_advanced('showstatisticsbox', 'showstatistics')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?>
</div>
<div id="showstatistics" style="display:none">
<strong><?php echo gettext("Warning: ")?></strong><?php echo gettext("these options will create persistant daily log files in /var/log/ntp."); ?>
<br /><br />
- <input name="clockstats" type="checkbox" class="formcheckbox" id="clockstats"<?php if($pconfig['clockstats']) echo ' checked'; ?>>
+ <input name="clockstats" type="checkbox" class="formcheckbox" id="clockstats"<?php if($pconfig['clockstats']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of reference clock statistics (default: disabled)."); ?>
<br />
- <input name="loopstats" type="checkbox" class="formcheckbox" id="loopstats"<?php if($pconfig['loopstats']) echo ' checked'; ?>>
+ <input name="loopstats" type="checkbox" class="formcheckbox" id="loopstats"<?php if($pconfig['loopstats']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of clock discipline statistics (default: disabled)."); ?>
<br />
- <input name="peerstats" type="checkbox" class="formcheckbox" id="peerstats"<?php if($pconfig['peerstats']) echo ' checked'; ?>>
+ <input name="peerstats" type="checkbox" class="formcheckbox" id="peerstats"<?php if($pconfig['peerstats']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of NTP peer statistics (default: disabled)."); ?>
</div>
</td>
@@ -356,27 +356,27 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq">Access restrictions</td>
<td width="78%" class="vtable">
<div id="showrestrictbox">
- <input type="button" onClick="show_advanced('showrestrictbox', 'showrestrict')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?></a>
+ <input type="button" onclick="show_advanced('showrestrictbox', 'showrestrict')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?>
</div>
<div id="showrestrict" style="display:none">
<?php echo gettext("these options control access to NTP from the WAN."); ?>
<br /><br />
- <input name="kod" type="checkbox" class="formcheckbox" id="kod"<?php if(!$pconfig['kod']) echo ' checked'; ?>>
+ <input name="kod" type="checkbox" class="formcheckbox" id="kod"<?php if(!$pconfig['kod']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable Kiss-o'-death packets (default: enabled)."); ?>
<br />
- <input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(!$pconfig['nomodify']) echo ' checked'; ?>>
+ <input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(!$pconfig['nomodify']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled)."); ?>
<br />
- <input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if($pconfig['noquery']) echo ' checked'; ?>>
+ <input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if($pconfig['noquery']) echo " checked=\"checked\""; ?> />>
<?php echo gettext("Disable ntpq and ntpdc queries (default: disabled)."); ?>
<br />
- <input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if($pconfig['noserve']) echo ' checked'; ?>>
+ <input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if($pconfig['noserve']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Disable all except ntpq and ntpdc queries (default: disabled)."); ?>
<br />
- <input name="nopeer" type="checkbox" class="formcheckbox" id="nopeer"<?php if(!$pconfig['nopeer']) echo ' checked'; ?>>
+ <input name="nopeer" type="checkbox" class="formcheckbox" id="nopeer"<?php if(!$pconfig['nopeer']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny packets that attempt a peer association (default: enabled)."); ?>
<br />
- <input name="notrap" type="checkbox" class="formcheckbox" id="notrap"<?php if(!$pconfig['notrap']) echo ' checked'; ?>>
+ <input name="notrap" type="checkbox" class="formcheckbox" id="notrap"<?php if(!$pconfig['notrap']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny mode 6 control message trap service (default: enabled)."); ?>
</div>
</td>
@@ -385,7 +385,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq">Leap seconds</td>
<td width="78%" class="vtable">
<div id="showleapsecbox">
- <input type="button" onClick="show_advanced('showleapsecbox', 'showleapsec')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?></a>
+ <input type="button" onclick="show_advanced('showleapsecbox', 'showleapsec')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?>
</div>
<div id="showleapsec" style="display:none">
<?php echo gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?>
@@ -394,14 +394,14 @@ include("head.inc");
<?php echo gettext("Enter Leap second configuration as text:");?><br />
<textarea name="leaptxt" class="formpre" id="leaptxt" cols="65" rows="7"><?php $text = base64_decode(chunk_split($pconfig['leapsec'])); echo $text;?></textarea><br />
<strong><?php echo gettext("Or");?></strong>, <?php echo gettext("select a file to upload:");?>
- <input type="file" name="leapfile" class="formfld file" id="leapfile">
+ <input type="file" name="leapfile" class="formfld file" id="leapfile" />
</div>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
</td>
</tr>
</table>
diff --git a/usr/local/www/services_ntpd_gps.php b/usr/local/www/services_ntpd_gps.php
index 755fb23..1d9c3e3 100644
--- a/usr/local/www/services_ntpd_gps.php
+++ b/usr/local/www/services_ntpd_gps.php
@@ -157,15 +157,15 @@ if ($_POST) {
set_default_gps();
}
}
+$closehead = false;
$pconfig = &$config['ntpd']['gps'];
-
$pgtitle = array(gettext("Services"),gettext("NTP GPS"));
$shortcut_section = "ntp";
include("head.inc");
?>
<script type="text/javascript">
-
+//<![CDATA[
function show_advanced(showboxID, configvalueID) {
document.getElementById(showboxID).innerHTML='';
aodiv = document.getElementById(configvalueID);
@@ -351,16 +351,16 @@ SureGPS = #Sure Electronics SKG16B
// Display the result
document.getElementById("nmeachecksum").innerHTML = hexsum;
}
-
+//]]>
</script>
-
+</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<form action="services_ntpd_gps.php" method="post" name="iform" id="iform" accept-charset="utf-8">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="ntpd gps">
<tr>
<td>
<?php
@@ -375,7 +375,7 @@ SureGPS = #Sure Electronics SKG16B
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("NTP Serial GPS Configuration"); ?></td>
</tr>
@@ -392,13 +392,13 @@ SureGPS = #Sure Electronics SKG16B
<td width="78%" valign="top" class="vtable">
<?php /* Start with the original "Default", list a "Generic" and then specific configs alphabetically */ ?>
<select id="gpstype" name="gpstype" class="formselect" onchange="set_gps_default(this.form)">
- <option value="Default"<?php if($pconfig['type'] == 'Default') echo ' selected'; ?>>Default</option>
- <option value="Generic" title="Generic"<?php if($pconfig['type'] == 'Generic') echo ' selected';?>>Generic</option>
- <option value="Garmin" title="$PGRM... Most Garmin"<?php if($pconfig['type'] == 'Garmin') echo ' selected';?>>Garmin</option>
- <option value="MediaTek" title="$PMTK... Adafruit, Fastrax, some Garmin and others"<?php if($pconfig['type'] == 'MediaTek') echo ' selected';?>>MediaTek</option>
- <option value="SiRF" title="$PSRF... Used by many devices"<?php if($pconfig['type'] == 'sirf') echo ' selected';?>>SiRF</option>
- <option value="U-Blox" title="$PUBX... U-Blox 5, 6 and probably 7"<?php if($pconfig['type'] == 'U-Blox') echo ' selected';?>>U-Blox</option>
- <option value="SureGPS" title="$PMTK... Sure Electronics SKG16B"<?php if($pconfig['type'] == 'SureGPS') echo ' selected';?>>SureGPS</option>
+ <option value="Default"<?php if($pconfig['type'] == 'Default') echo " selected=\"selected\""; ?>>Default</option>
+ <option value="Generic" title="Generic"<?php if($pconfig['type'] == 'Generic') echo " selected=\"selected\"";?>>Generic</option>
+ <option value="Garmin" title="$PGRM... Most Garmin"<?php if($pconfig['type'] == 'Garmin') echo " selected=\"selected\"";?>>Garmin</option>
+ <option value="MediaTek" title="$PMTK... Adafruit, Fastrax, some Garmin and others"<?php if($pconfig['type'] == 'MediaTek') echo " selected=\"selected\"";?>>MediaTek</option>
+ <option value="SiRF" title="$PSRF... Used by many devices"<?php if($pconfig['type'] == 'sirf') echo " selected=\"selected\"";?>>SiRF</option>
+ <option value="U-Blox" title="$PUBX... U-Blox 5, 6 and probably 7"<?php if($pconfig['type'] == 'U-Blox') echo " selected=\"selected\"";?>>U-Blox</option>
+ <option value="SureGPS" title="$PMTK... Sure Electronics SKG16B"<?php if($pconfig['type'] == 'SureGPS') echo " selected=\"selected\"";?>>SureGPS</option>
</select> <?php echo gettext("This option allows you to select a predefined configuration.");?>
<br />
<br />
@@ -418,19 +418,19 @@ SureGPS = #Sure Electronics SKG16B
<option value="">none</option>
<?php foreach ($serialports as $port):
$shortport = substr($port,5);
- $selected = ($shortport == $pconfig['port']) ? " selected" : "";?>
+ $selected = ($shortport == $pconfig['port']) ? " selected=\"selected\"" : "";?>
<option value="<?php echo $shortport;?>"<?php echo $selected;?>><?php echo $shortport;?></option>
<?php endforeach; ?>
</select>&nbsp;
<?php echo gettext("All serial ports are listed, be sure to pick the port with the GPS attached."); ?>
<br /><br />
<select id="gpsspeed" name="gpsspeed" class="formselect">
- <option value="0"<?php if(!$pconfig['speed']) echo ' selected'; ?>>4800</option>
- <option value="16"<?php if($pconfig['speed'] === '16') echo ' selected';?>>9600</option>
- <option value="32"<?php if($pconfig['speed'] === '32') echo ' selected';?>>19200</option>
- <option value="48"<?php if($pconfig['speed'] === '48') echo ' selected';?>>38400</option>
- <option value="64"<?php if($pconfig['speed'] === '64') echo ' selected';?>>57600</option>
- <option value="80"<?php if($pconfig['speed'] === '80') echo ' selected';?>>115200</option>
+ <option value="0"<?php if(!$pconfig['speed']) echo " selected=\"selected\""; ?>>4800</option>
+ <option value="16"<?php if($pconfig['speed'] === '16') echo " selected=\"selected\"";?>>9600</option>
+ <option value="32"<?php if($pconfig['speed'] === '32') echo " selected=\"selected\"";?>>19200</option>
+ <option value="48"<?php if($pconfig['speed'] === '48') echo " selected=\"selected\"";?>>38400</option>
+ <option value="64"<?php if($pconfig['speed'] === '64') echo " selected=\"selected\"";?>>57600</option>
+ <option value="80"<?php if($pconfig['speed'] === '80') echo " selected=\"selected\"";?>>115200</option>
</select>&nbsp;<?php echo gettext("Serial port baud rate."); ?>
<br />
<br />
@@ -442,12 +442,12 @@ SureGPS = #Sure Electronics SKG16B
<?php /* 1 = MRC, 2 = GGA, 4 = GLL, 8 = ZDA or ZDG */?>
<td width="22%" valign="top" class="vncellreq">NMEA sentences</td>
<td width="78%" class="vtable">
- <select id="gpsnmea" name="gpsnmea[]" multiple="true" class="formselect">
- <option value="0"<?php if(!$pconfig['nmea']) echo ' selected'; ?>>All</option>
- <option value="1"<?php if($pconfig['nmea'] & 1) echo ' selected';?>>MRC</option>
- <option value="2"<?php if($pconfig['nmea'] & 2) echo ' selected';?>>GGA</option>
- <option value="4"<?php if($pconfig['nmea'] & 4) echo ' selected';?>>GLL</option>
- <option value="8"<?php if($pconfig['nmea'] & 8) echo ' selected';?>>ZDA or ZDG</option>
+ <select id="gpsnmea" name="gpsnmea[]" multiple="multiple" class="formselect">
+ <option value="0"<?php if(!$pconfig['nmea']) echo " selected=\"selected\""; ?>>All</option>
+ <option value="1"<?php if($pconfig['nmea'] & 1) echo " selected=\"selected\"";?>>MRC</option>
+ <option value="2"<?php if($pconfig['nmea'] & 2) echo " selected=\"selected\"";?>>GGA</option>
+ <option value="4"<?php if($pconfig['nmea'] & 4) echo " selected=\"selected\"";?>>GLL</option>
+ <option value="8"<?php if($pconfig['nmea'] & 8) echo " selected=\"selected\"";?>>ZDA or ZDG</option>
</select><br />
<?php echo gettext("By default NTP will listen for all supported NMEA sentences. Here one or more sentences to listen for may be specified."); ?>
</td>
@@ -455,19 +455,19 @@ SureGPS = #Sure Electronics SKG16B
<tr>
<td width="22%" valign="top" class="vncellreq">Fudge time 1</td>
<td width="78%" class="vtable">
- <input name="gpsfudge1" type="text" class="formfld unknown" id="gpsfudge1" min="-1" max="1" size="20" value="<?=htmlspecialchars($pconfig['fudge1']);?>">(<?php echo gettext("seconds");?>)<br />
+ <input name="gpsfudge1" type="text" class="formfld unknown" id="gpsfudge1" min="-1" max="1" size="20" value="<?=htmlspecialchars($pconfig['fudge1']);?>" />(<?php echo gettext("seconds");?>)<br />
<?php echo gettext("Fudge time 1 is used to specify the GPS PPS signal offset");?> (<?php echo gettext("default");?>: 0.0).</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">Fudge time 2</td>
<td width="78%" class="vtable">
- <input name="gpsfudge2" type="text" class="formfld unknown" id="gpsfudge2" min="-1" max="1" size="20" value="<?=htmlspecialchars($pconfig['fudge2']);?>">(<?php echo gettext("seconds");?>)<br />
+ <input name="gpsfudge2" type="text" class="formfld unknown" id="gpsfudge2" min="-1" max="1" size="20" value="<?=htmlspecialchars($pconfig['fudge2']);?>" />(<?php echo gettext("seconds");?>)<br />
<?php echo gettext("Fudge time 2 is used to specify the GPS time offset");?> (<?php echo gettext("default");?>: 0.0).</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">Stratum</td>
<td width="78%" class="vtable">
- <input name="gpsstratum" type="text" class="formfld unknown" id="gpsstratum" max="16" size="20" value="<?=htmlspecialchars($pconfig['stratum']);?>"><?php echo gettext("(0-16)");?><br />
+ <input name="gpsstratum" type="text" class="formfld unknown" id="gpsstratum" max="16" size="20" value="<?=htmlspecialchars($pconfig['stratum']);?>" /><?php echo gettext("(0-16)");?><br />
<?php echo gettext("This may be used to change the GPS Clock stratum");?> (<?php echo gettext("default");?>: 0). <?php echo gettext("This may be useful if, for some reason, you want ntpd to prefer a different clock"); ?></td>
</tr>
<tr>
@@ -483,7 +483,7 @@ SureGPS = #Sure Electronics SKG16B
<table>
<tr>
<td>
- <input name="gpsprefer" type="checkbox" class="formcheckbox" id="gpsprefer" OnClick="ToggleOther('gpsprefer', 'gpsselect')"<?php if(!$pconfig['prefer']) echo ' checked'; ?>>
+ <input name="gpsprefer" type="checkbox" class="formcheckbox" id="gpsprefer" onclick="ToggleOther('gpsprefer', 'gpsselect')"<?php if(!$pconfig['prefer']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("NTP should prefer this clock (default: enabled)."); ?></span>
@@ -491,7 +491,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpsselect" type="checkbox" class="formcheckbox" id="gpsselect" OnClick="ToggleOther('gpsselect', 'gpsprefer')"<?php if($pconfig['noselect']) echo ' checked'; ?>>
+ <input name="gpsselect" type="checkbox" class="formcheckbox" id="gpsselect" onclick="ToggleOther('gpsselect', 'gpsprefer')"<?php if($pconfig['noselect']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("NTP should not use this clock, it will be displayed for reference only(default: disabled)."); ?></span>
@@ -499,7 +499,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpsflag1" type="checkbox" class="formcheckbox" id="gpsflag1"<?php if($pconfig['flag1']) echo ' checked'; ?>>
+ <input name="gpsflag1" type="checkbox" class="formcheckbox" id="gpsflag1"<?php if($pconfig['flag1']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("Enable PPS signal processing (default: enabled)."); ?></span>
@@ -507,7 +507,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpsflag2" type="checkbox" class="formcheckbox" id="gpsflag2"<?php if($pconfig['flag2']) echo ' checked'; ?>>
+ <input name="gpsflag2" type="checkbox" class="formcheckbox" id="gpsflag2"<?php if($pconfig['flag2']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("Enable falling edge PPS signal processing (default: rising edge)."); ?></span>
@@ -515,7 +515,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpsflag3" type="checkbox" class="formcheckbox" id="gpsflag3"<?php if($pconfig['flag3']) echo ' checked'; ?>>
+ <input name="gpsflag3" type="checkbox" class="formcheckbox" id="gpsflag3"<?php if($pconfig['flag3']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("Enable kernel PPS clock discipline (default: enabled)."); ?></span>
@@ -523,7 +523,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpsflag4" type="checkbox" class="formcheckbox" id="gpsflag4"<?php if($pconfig['flag4']) echo ' checked'; ?>>
+ <input name="gpsflag4" type="checkbox" class="formcheckbox" id="gpsflag4"<?php if($pconfig['flag4']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("Obscure location in timestamp (default: unobscured)."); ?></span>
@@ -531,7 +531,7 @@ SureGPS = #Sure Electronics SKG16B
</tr>
<tr>
<td>
- <input name="gpssubsec" type="checkbox" class="formcheckbox" id="gpssubsec"<?php if($pconfig['subsec']) echo ' checked'; ?>>
+ <input name="gpssubsec" type="checkbox" class="formcheckbox" id="gpssubsec"<?php if($pconfig['subsec']) echo " checked=\"checked\""; ?> />
</td>
<td>
<span class="vexpl"><?php echo gettext("Log the sub-second fraction of the received time stamp (default: Not logged).<br />Note: enabling this will rapidly fill the log, but is useful for tuning Fudge time 2."); ?></span>
@@ -543,14 +543,14 @@ SureGPS = #Sure Electronics SKG16B
<tr>
<td width="22%" valign="top" class="vncellreq">Clock ID</td>
<td width="78%" class="vtable">
- <input name="gpsrefid" type="text" class="formfld unknown" id="gpsrefid" maxlength= "4" size="20" value="<?=htmlspecialchars($pconfig['refid']);?>"><?php echo gettext("(1 to 4 charactors)");?><br />
+ <input name="gpsrefid" type="text" class="formfld unknown" id="gpsrefid" maxlength= "4" size="20" value="<?=htmlspecialchars($pconfig['refid']);?>" /><?php echo gettext("(1 to 4 charactors)");?><br />
<?php echo gettext("This may be used to change the GPS Clock ID");?> (<?php echo gettext("default");?>: GPS).</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">GPS Initialization</td>
<td width="78%" class="vtable">
<div id="showgpsinitbox">
- <input type="button" onClick="show_advanced('showgpsinitbox', 'showgpsinit')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show GPS Initialization commands");?></a>
+ <input type="button" onclick="show_advanced('showgpsinitbox', 'showgpsinit')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show GPS Initialization commands");?>
</div>
<div id="showgpsinit" style="display:none">
<p>
@@ -558,15 +558,15 @@ SureGPS = #Sure Electronics SKG16B
<?php echo gettext("Note: Commands entered here will be sent to the GPS during initialization. Please read and understand your GPS documentation before making any changes here.");?><br /><br />
<strong><?php echo gettext("NMEA checksum calculator");?>:</strong>
<br />
- <?php echo gettext("Enter the text between &quot;$&quot; and &quot;*&quot; of a NMEA command string:");?><br /> $<input name="nmeastring" type="text" class="formfld unknown" id="nmeastring" size="30" value="">*<span id="nmeachecksum"><?php echo gettext("checksum");?></span>&nbsp&nbsp
- <input type="button" onClick="NMEAChecksum(nmeastring.value)" value="<?=gettext("Calculate NMEA checksum");?>" /><br />
+ <?php echo gettext("Enter the text between &quot;$&quot; and &quot;*&quot; of a NMEA command string:");?><br /> $<input name="nmeastring" type="text" class="formfld unknown" id="nmeastring" size="30" value="" />*<span id="nmeachecksum"><?php echo gettext("checksum");?></span>&nbsp&nbsp
+ <input type="button" onclick="NMEAChecksum(nmeastring.value)" value="<?=gettext("Calculate NMEA checksum");?>" /><br /></p>
</div>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
</td>
</tr>
</table>
@@ -574,7 +574,11 @@ SureGPS = #Sure Electronics SKG16B
</td>
</tr>
</table>
-<script type="text/javascript"><!-- set_gps_default(this.form); --></script>
+<script type="text/javascript">
+//<![CDATA[
+set_gps_default(this.form);
+//]]>
+</script>
</form>
<?php include("fend.inc"); ?>
</body>
diff --git a/usr/local/www/services_unbound.php b/usr/local/www/services_unbound.php
index a6a61aa..08a2e6e 100644
--- a/usr/local/www/services_unbound.php
+++ b/usr/local/www/services_unbound.php
@@ -110,6 +110,8 @@ if ($_POST) {
$savemsg = get_std_save_message($retval);
if ($retval == 0)
clear_subsystem_dirty('unbound');
+ /* Update resolv.conf in case the interface bindings exclude localhost. */
+ system_resolvconf_generate();
}
}
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index be5446e..a5e2b17 100644
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -402,7 +402,7 @@ include("head.inc");
<?=gettext("Do not use the DNS Forwarder as a DNS server for the firewall"); ?>
</strong>
<br />
- <?=gettext("By default localhost (127.0.0.1) will be used as the first DNS server where the DNS forwarder is enabled, so system can use the DNS forwarder to perform lookups. ".
+ <?=gettext("By default localhost (127.0.0.1) will be used as the first DNS server where the DNS Forwarder or DNS Resolver is enabled and set to listen on Localhost, so system can use the local DNS service to perform lookups. ".
"Checking this box omits localhost from the list of DNS servers."); ?>
</span>
</td>
OpenPOWER on IntegriCloud