summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-09-16 14:43:30 +0545
committerPhil Davis <phil.davis@inf.org>2015-09-16 14:43:30 +0545
commit6990ad353c23ba4ebfd89e3a6070e99c368051f0 (patch)
treeca99ddd1bb6481ac651f41b0c76a5465ec7ff806 /src/etc
parentcc493d00395ad5e9b6f90c46b1882b3546c2b1ca (diff)
downloadpfsense-6990ad353c23ba4ebfd89e3a6070e99c368051f0.zip
pfsense-6990ad353c23ba4ebfd89e3a6070e99c368051f0.tar.gz
White space and minor bits in etc
Cleaner version of https://github.com/pfsense/pfsense/pull/1846
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/auth.inc12
-rw-r--r--src/etc/inc/config.lib.inc2
-rw-r--r--src/etc/inc/filter.inc2
-rw-r--r--src/etc/inc/filter_log.inc10
-rw-r--r--src/etc/inc/interfaces.inc6
-rw-r--r--src/etc/inc/pfsense-utils.inc2
-rw-r--r--src/etc/inc/shaper.inc8
-rw-r--r--src/etc/inc/upgrade_config.inc4
-rw-r--r--src/etc/inc/vpn.inc10
-rw-r--r--src/etc/phpshellsessions/gitsync2
-rw-r--r--src/etc/phpshellsessions/svc2
-rwxr-xr-xsrc/etc/rc2
-rwxr-xr-xsrc/etc/rc.filter_synchronize4
-rwxr-xr-xsrc/etc/rc.start_packages14
14 files changed, 40 insertions, 40 deletions
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc
index 6f19ee4..f30a996 100644
--- a/src/etc/inc/auth.inc
+++ b/src/etc/inc/auth.inc
@@ -1252,10 +1252,10 @@ function ldap_backed($username, $passwd, $authcfg) {
$usercount = 0;
/*****************************************************************/
- /* We First find the user based on username and filter */
- /* Then, once we find the first occurrence of that person */
- /* We set session variables to point to the OU and DN of the */
- /* Person. To later be used by ldap_get_groups. */
+ /* We first find the user based on username and filter */
+ /* then, once we find the first occurrence of that person */
+ /* we set session variables to point to the OU and DN of the */
+ /* person. To later be used by ldap_get_groups. */
/* that way we don't have to search twice. */
/*****************************************************************/
if ($debug) {
@@ -1277,9 +1277,9 @@ function ldap_backed($username, $passwd, $authcfg) {
}
/* Support legacy auth container specification. */
if (stristr($ldac_split, "DC=") || empty($ldapbasedn)) {
- $search = @$ldapfunc($ldap,$ldac_split,$ldapfilter);
+ $search = @$ldapfunc($ldap, $ldac_split, $ldapfilter);
} else {
- $search = @$ldapfunc($ldap,$ldapsearchbasedn,$ldapfilter);
+ $search = @$ldapfunc($ldap, $ldapsearchbasedn, $ldapfilter);
}
if (!$search) {
log_error(sprintf(gettext("Search resulted in error: %s"), ldap_error($ldap)));
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index 222d9d8..cda88a6 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -189,7 +189,7 @@ function generate_config_cache($config) {
fwrite($configcache, serialize($config));
fclose($configcache);
pfSense_fsync("{$g['tmp_path']}/config.cache");
-
+
unset($configcache);
/* Used for config.extra.xml */
if (file_exists($g['tmp_path'] . '/config.extra.cache') && $config_extra) {
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index 158736c..de98352 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -1305,7 +1305,7 @@ function filter_generate_reflection_nat($rule, &$route_table, $nat_ifs, $protoco
break;
}
}
- if(!empty($ifsubnet_ip) && !in_array($subnet, $no_reflect_from)) {
+ if (!empty($ifsubnet_ip) && !in_array($subnet, $no_reflect_from)) {
$subnets = array($subnet);
/* Find static routes that also need to be referenced in the NAT rule */
foreach ($route_table as $rtentry) {
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc
index 44c1673..6779f4d 100644
--- a/src/etc/inc/filter_log.inc
+++ b/src/etc/inc/filter_log.inc
@@ -73,7 +73,7 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
$flent = parse_filter_line($logent);
if (!$filterinterface || ($filterinterface == $flent['interface'])) {
- if ((($flent != "") && (!is_array($filtertext)) && (match_filter_line ($flent, $filtertext))) ||
+ if ((($flent != "") && (!is_array($filtertext)) && (match_filter_line($flent, $filtertext))) ||
(($flent != "") && (is_array($filtertext)) && (match_filter_field($flent, $filtertext)))) {
$counter++;
$filterlog[] = $flent;
@@ -86,7 +86,7 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
function escape_filter_regex($filtertext) {
/* If the caller (user) has not already put a backslash before a slash, to escape it in the regex, */
- /* then this will do it. Take out any "\/" already there, then turn all ordinary "/" into "\/". */
+ /* then this will do it. Take out any "\/" already there, then turn all ordinary "/" into "\/". */
return str_replace('/', '\/', str_replace('\/', '/', $filtertext));
}
@@ -413,9 +413,9 @@ function handle_ajax($nentries, $tail = 50) {
if ($_POST['lastsawtime']) {
$lastsawtime = $_POST['lastsawtime'];
}
- /* compare lastsawrule's time stamp to filter logs.
- * afterwards return the newer records so that client
- * can update AJAX interface screen.
+ /* compare lastsawrule's time stamp to filter logs.
+ * afterwards return the newer records so that client
+ * can update AJAX interface screen.
*/
$new_rules = "";
$filterlog = conv_log_filter($filter_logfile, $nentries, $tail);
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index a841a9d..f7e60a6 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -1311,7 +1311,7 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg =
if (does_interface_exist("$realif")) {
/* destroy stf interface if tunnel is being disabled or tunnel type is being changed */
if (($ifcfg['ipaddrv6'] == '6rd' && (!isset($config['interfaces'][$interface]['ipaddrv6']) || $config['interfaces'][$interface]['ipaddrv6'] != '6rd')) ||
- ($ifcfg['ipaddrv6'] == '6to4' && (!isset($config['interfaces'][$interface]['ipaddrv6']) || $config['interfaces'][$interface]['ipaddrv6'] != '6to4'))) {
+ ($ifcfg['ipaddrv6'] == '6to4' && (!isset($config['interfaces'][$interface]['ipaddrv6']) || $config['interfaces'][$interface]['ipaddrv6'] != '6to4'))) {
$destroy = true;
} else {
/* get_interface_ipv6() returns empty value if interface is being disabled */
@@ -3984,7 +3984,7 @@ function DHCP6_Config_File_Advanced($interface, $wancfg, $wanif) {
$id_assoc_statement_prefix .= "\t\tsla-id {$wancfg['adv_dhcp6_prefix_interface_statement_sla_id']};\n";
if (($wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] >= 0) &&
($wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] <= 128)) {
- $id_assoc_statement_prefix .= "\t\tsla-len {$wancfg['adv_dhcp6_prefix_interface_statement_sla_len']};\n";
+ $id_assoc_statement_prefix .= "\t\tsla-len {$wancfg['adv_dhcp6_prefix_interface_statement_sla_len']};\n";
}
$id_assoc_statement_prefix .= "\t};";
}
@@ -5291,7 +5291,7 @@ function get_interface_ip($interface = "wan") {
if (substr($realif, 0, 4) == '_vip') {
return get_configured_carp_interface_list($realif, 'inet', 'ip');
}
-
+
if (strstr($realif, "_vip")) {
return get_configured_carp_interface_list($realif);
}
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc
index f31f63b..caff887 100644
--- a/src/etc/inc/pfsense-utils.inc
+++ b/src/etc/inc/pfsense-utils.inc
@@ -1071,7 +1071,7 @@ function setup_serial_port($when = "save", $path = "") {
}
}
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
-
+
$specplatform = system_identify_specific_platform();
if ($specplatform['name'] == 'RCC-VE' ||
$specplatform['name'] == 'RCC-DFF') {
diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc
index bb84144..f4b562e 100644
--- a/src/etc/inc/shaper.inc
+++ b/src/etc/inc/shaper.inc
@@ -601,10 +601,10 @@ class altq_root_queue {
/*
* First it spits:
* altq on $interface ..............
- * then it goes like
- * foreach ($queues as $qkey => $queue) {
- * this->queues[$qkey]->build_rule();
- * }
+ * then it goes like
+ * foreach ($queues as $qkey => $queue) {
+ * this->queues[$qkey]->build_rule();
+ * }
*/
function build_rules(&$default = false) {
if (count($this->queues) > 0 && $this->GetEnabled() == "on") {
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index 34f3353..49f0eae 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -3800,7 +3800,7 @@ function upgrade_117_to_118() {
$a_phase1 =& $config['ipsec']['phase1'];
foreach ($a_phase1 as &$ph1_entry) {
- // update asn1dn strings from racoon's format to strongswan's
+ // update asn1dn strings from racoon's format to strongswan's
if (isset($ph1_entry['myid_type']) && $ph1_entry['myid_type'] == 'asn1dn') {
$ph1_entry['myid_data'] =
preg_replace('/\/\s*emailAddress\s*=\s*/', ', E=', $ph1_entry['myid_data']);
@@ -3828,7 +3828,7 @@ function upgrade_118_to_119() {
foreach ($a_phase1 as &$ph1_entry) {
if (strstr($ph1_entry['authentication_method'], 'eap')) {
- $ph1_entry['peerid_type'] = "any";
+ $ph1_entry['peerid_type'] = "any";
}
}
}
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index 9622067..3225454 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -582,7 +582,7 @@ EOD;
unset($cert);
}
}
-
+
/* write out CRL files */
if (is_array($config['crl']) && count($config['crl'])) {
foreach ($config['crl'] as $crl) {
@@ -641,7 +641,7 @@ EOD;
} else {
list ($myid_type, $myid_data) = ipsec_find_id($ph1ent, 'local');
list ($peerid_type, $peerid_data) = ipsec_find_id($ph1ent, 'peer', $rgmap);
-
+
$myid = trim($myid_data);
if (empty($peerid_data)) {
@@ -651,7 +651,7 @@ EOD;
if ($myid_type == 'fqdn' && !empty($myid)) {
$myid = "@{$myid}";
}
-
+
$myid = isset($ph1ent['mobile']) ? trim($myid_data) : "%any";
$peerid = ($peerid_data != 'allusers') ? trim($peerid_data) : '';
@@ -710,7 +710,7 @@ EOD;
$ipsecconf .= "# This file is automatically generated. Do not edit\n";
$ipsecconf .= "config setup\n\tuniqueids = {$uniqueids}\n";
$ipsecconf .= "\tcharondebug=\"" . vpn_ipsec_configure_loglevels(true) . "\"\n";
-
+
if (isset($config['ipsec']['strictcrlpolicy'])) {
$ipsecconf .= "\tstrictcrlpolicy = yes \n";
}
@@ -758,7 +758,7 @@ EOD;
if ($ph1ent['iketype'] == "ikev2") {
$keyexchange = "ikev2";
//$passive = "start";
- }
+ }
}
if (isset($ph1ent['mobile'])) {
diff --git a/src/etc/phpshellsessions/gitsync b/src/etc/phpshellsessions/gitsync
index d932bb3..d440e5a 100644
--- a/src/etc/phpshellsessions/gitsync
+++ b/src/etc/phpshellsessions/gitsync
@@ -410,7 +410,7 @@ function isUrl($url = "") {
if ($url) {
if (strstr($url, "rcs.pfsense.org") or
strstr($url, "mainline") or
- strstr($url, ".git") or
+ strstr($url, ".git") or
strstr($url, "git://")) {
return true;
}
diff --git a/src/etc/phpshellsessions/svc b/src/etc/phpshellsessions/svc
index ee1ab40..7343393 100644
--- a/src/etc/phpshellsessions/svc
+++ b/src/etc/phpshellsessions/svc
@@ -31,7 +31,7 @@ $action = $args[0];
// dhcpd, openvpn, etc.
$svc_name = $args[1];
-// Handle servive-specific options.
+// Handle service-specific options.
switch ($svc_name) {
case "openvpn":
if (in_array($args[2], array("server", "client"))) {
diff --git a/src/etc/rc b/src/etc/rc
index 4c4b848..165c7ef 100755
--- a/src/etc/rc
+++ b/src/etc/rc
@@ -129,7 +129,7 @@ if [ -f /etc/rc.disable_hdd_apm ]; then
/etc/rc.disable_hdd_apm
fi
-#Eject CD devices on 3G modems
+# Eject CD devices on 3G modems
MANUFACTURER="huawei|zte"
CDDEVICE=`dmesg |egrep -ie "($MANUFACTURER)" | awk -F: '/cd/ {print $1}'`
if [ "$CDDEVICE" != "" ]; then
diff --git a/src/etc/rc.filter_synchronize b/src/etc/rc.filter_synchronize
index f31fa34..b7148eb 100755
--- a/src/etc/rc.filter_synchronize
+++ b/src/etc/rc.filter_synchronize
@@ -130,8 +130,8 @@ function carp_check_version($url, $username, $password, $port = 80, $method = 'p
}
} else {
if (!isset($parsed_response['config_version']) ||
- ($parsed_response['config_version'] < $config['version']) ||
- ($parsed_response['config_version'] > $config['version'])) {
+ ($parsed_response['config_version'] < $config['version']) ||
+ ($parsed_response['config_version'] > $config['version'])) {
update_filter_reload_status("The other member is on a different configuration version of {$g['product_name']}. Sync will not be done to prevent problems!");
log_error("The other member is on a different configuration version of {$g['product_name']}. Sync will not be done to prevent problems!");
return false;
diff --git a/src/etc/rc.start_packages b/src/etc/rc.start_packages
index 3d8bbbc..233c236 100755
--- a/src/etc/rc.start_packages
+++ b/src/etc/rc.start_packages
@@ -39,13 +39,13 @@ require_once("pfsense-utils.inc");
require_once("service-utils.inc");
if (file_exists("{$g['tmp_path']}/.rc.start_packages.running")) {
- $stat = stat("{$g['tmp_path']}/.rc.start_packages.running");
- if (time() - $stat['mtime'] >= 90) {
- @unlink("{$g['tmp_path']}/.rc.start_packages.running");
- } else {
- log_error("Skipping STARTing packages process because previous/another instance is already running");
- return;
- }
+ $stat = stat("{$g['tmp_path']}/.rc.start_packages.running");
+ if (time() - $stat['mtime'] >= 90) {
+ @unlink("{$g['tmp_path']}/.rc.start_packages.running");
+ } else {
+ log_error("Skipping STARTing packages process because previous/another instance is already running");
+ return;
+ }
}
@file_put_contents("{$g['tmp_path']}/.rc.start_packages.running", "");
OpenPOWER on IntegriCloud