summaryrefslogtreecommitdiffstats
path: root/etc/rc.newipsecdns
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-04-12 19:42:18 +0000
committerErmal <eri@pfsense.org>2013-04-12 19:42:18 +0000
commitde0de3825b7d6ccf696ffb7eade71a7b0d9a68c3 (patch)
treeec74cc029fc9cc74864d2b04fa9d629101ac0dd5 /etc/rc.newipsecdns
parentc653ce27d076878f1ef342a6da8d3d3f8a67b021 (diff)
downloadpfsense-de0de3825b7d6ccf696ffb7eade71a7b0d9a68c3.zip
pfsense-de0de3825b7d6ccf696ffb7eade71a7b0d9a68c3.tar.gz
Correct a bit formating here
Diffstat (limited to 'etc/rc.newipsecdns')
-rwxr-xr-xetc/rc.newipsecdns54
1 files changed, 29 insertions, 25 deletions
diff --git a/etc/rc.newipsecdns b/etc/rc.newipsecdns
index db1d237..554fc80 100755
--- a/etc/rc.newipsecdns
+++ b/etc/rc.newipsecdns
@@ -30,31 +30,35 @@
POSSIBILITY OF SUCH DAMAGE.
*/
- /* parse the configuration and include all functions used below */
- require_once("config.inc");
- require_once("functions.inc");
- require_once("filter.inc");
- require_once("shaper.inc");
- require_once("ipsec.inc");
- require_once("vpn.inc");
- require_once("util.inc");
+/* parse the configuration and include all functions used below */
+require_once("util.inc");
+require_once("config.inc");
+require_once("gwlb.inc");
+require_once("functions.inc");
+require_once("filter.inc");
+require_once("shaper.inc");
+require_once("ipsec.inc");
+require_once("vpn.inc");
- /* make sure to wait until the boot scripts have finished */
- while (file_exists("{$g['varrun_path']}/booting")) {
- sleep(1);
- }
- $ipseclck = lock('ipsecdns', LOCK_EX);
-
- if(isset($config['ipsec']['enable']))
- log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing.");
- /* We will walk the list of hostnames found in the ipsec tunnel
- * configuration. Since we are already triggered by filterdns
- * that a hostname has changed we can proceed to compare the
- * new IP address with the old address from the DNS cache.
- */
- vpn_ipsec_refresh_policies();
-
- vpn_ipsec_configure();
+/* make sure to wait until the boot scripts have finished */
+if (file_exists("{$g['varrun_path']}/booting"))
+ return;
+
+if (isset($config['ipsec']['enable']))
+ log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing.");
+else
+ return;
+
+$ipseclck = lock('ipsecdns', LOCK_EX);
+
+/* We will walk the list of hostnames found in the ipsec tunnel
+ * configuration. Since we are already triggered by filterdns
+ * that a hostname has changed we can proceed to compare the
+ * new IP address with the old address from the DNS cache.
+ */
+vpn_ipsec_refresh_policies();
+
+vpn_ipsec_configure();
- unlock($ipseclck);
+unlock($ipseclck);
?>
OpenPOWER on IntegriCloud