summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-03-18 10:37:09 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-03-19 09:23:39 -0300
commit7488a9e09f85dc9a9208da3db9c717588a43fa6e (patch)
tree0bd618c9fc0d92823ca484442ceaa47d0192f92a /etc
parenta56d8b08b2e80b3febc17ef7d8e137e9cdffeff0 (diff)
downloadpfsense-7488a9e09f85dc9a9208da3db9c717588a43fa6e.zip
pfsense-7488a9e09f85dc9a9208da3db9c717588a43fa6e.tar.gz
Fix whitespace and indent
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.newwanip84
1 files changed, 42 insertions, 42 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 4d0ecf3..d678927 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -1,34 +1,34 @@
#!/usr/local/bin/php -f
<?php
/*
- rc.newwanip
- Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
- part of pfSense (http://www.pfsense.com)
-
- Originally part of m0n0wall (http://m0n0.ch)
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ rc.newwanip
+ Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
+ part of pfSense (http://www.pfsense.com)
+
+ Originally part of m0n0wall (http://m0n0.ch)
+ Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
@@ -43,7 +43,7 @@ require_once("openvpn.inc");
require_once("rrd.inc");
// Do not process while booting
-if($g['booting'])
+if($g['booting'])
exit;
function restart_packages() {
@@ -52,7 +52,7 @@ function restart_packages() {
/* restart packages */
system_ntp_configure(false);
mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh", true);
- log_error("{$g['product_name']} package system has detected an ip change $oldip -> $curwanip ... Restarting packages.");
+ log_error("{$g['product_name']} package system has detected an ip change $oldip -> $curwanip ... Restarting packages.");
send_event("service reload packages");
}
@@ -62,23 +62,23 @@ $argument = str_replace("\n", "", $argv[1]);
log_error("rc.newwanip: Informational is starting {$argument}.");
if(empty($argument)) {
- $curwanip = get_interface_ip();
- $interface = "wan";
- $interface_real = get_real_interface();
+ $curwanip = get_interface_ip();
+ $interface = "wan";
+ $interface_real = get_real_interface();
} else {
- $interface = convert_real_interface_to_friendly_interface_name($argument);
- $interface_real = $argument;
- $curwanip = find_interface_ip($interface_real, true);
- if($curwanip == "")
- $curwanip = get_interface_ip($interface);
+ $interface = convert_real_interface_to_friendly_interface_name($argument);
+ $interface_real = $argument;
+ $curwanip = find_interface_ip($interface_real, true);
+ if($curwanip == "")
+ $curwanip = get_interface_ip($interface);
}
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface}) (real interface: {$interface_real}).");
if($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) {
- log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
+ log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
send_event("interface reconfigure {$interface}");
- exit;
+ exit;
}
if (empty($interface)) {
@@ -166,8 +166,8 @@ setup_gateways_monitor();
filter_configure();
if (is_ipaddr($oldip) && $curwanip == $oldip) {
- /* We need to force sync VPNs on such even when the IP is the same. Even with
- * the same IP the VPN software is unhappy with the IP disappearing, and we
+ /* We need to force sync VPNs on such even when the IP is the same. Even with
+ * the same IP the VPN software is unhappy with the IP disappearing, and we
* could be failing back in which case we need to switch IPs back anyhow. */
/* reconfigure IPsec tunnels */
OpenPOWER on IntegriCloud