diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 13:10:01 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 13:10:01 +0100 |
commit | 285ef132f7d671620f269a57d2ebcff585d2a493 (patch) | |
tree | b491fad66d22765d9640b2ac543c41b6e417a95d /etc/inc/vpn.inc | |
parent | 32e834ffd3b4cc6cdc6b147c91cb6dbcb0a93288 (diff) | |
download | pfsense-285ef132f7d671620f269a57d2ebcff585d2a493.zip pfsense-285ef132f7d671620f269a57d2ebcff585d2a493.tar.gz |
Rather than set the g['booting'] on globals provide a function to test for that doing the right checks
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 61d28df..5b018b7 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -157,7 +157,7 @@ function vpn_ipsec_configure($ipchg = false) mkdir("{$g['varetc_path']}/ipsec/ipsec.d/reqs"); - if ($g['booting']) + if (platform_booting()) echo gettext("Configuring IPsec VPN... "); /* fastforwarding is not compatible with ipsec tunnels */ @@ -198,7 +198,7 @@ function vpn_ipsec_configure($ipchg = false) if (!is_ipaddr($rg)) { $filterdns_list[] = "{$rg}"; add_hostname_to_watch($rg); - if(! $g['booting']) + if (!platform_booting()) $rg = resolve_retry($rg); if (!is_ipaddr($rg)) continue; @@ -881,7 +881,7 @@ EOD; @unlink("{$g['varrun_path']}/filterdns-ipsec.pid"); } - if ($g['booting']) + if (platform_booting()) echo "done\n"; return count($filterdns_list); @@ -953,7 +953,7 @@ function vpn_pptpd_configure() { $syscfg = $config['system']; $pptpdcfg = $config['pptpd']; - if ($g['booting']) { + if (platform_booting()) { if (!$pptpdcfg['mode'] || ($pptpdcfg['mode'] == "off")) return 0; @@ -1164,7 +1164,7 @@ EOD; break; } - if ($g['booting']) + if (platform_booting()) echo "done\n"; return 0; @@ -1188,7 +1188,7 @@ function vpn_pppoe_configure(&$pppoecfg) { if (!is_dir("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn")) mkdir("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn"); - if ($g['booting']) { + if (platform_booting()) { if (!$pppoecfg['mode'] || ($pppoecfg['mode'] == "off")) return 0; @@ -1384,7 +1384,7 @@ EOD; break; } - if ($g['booting']) + if (platform_booting()) echo gettext("done") . "\n"; return 0; @@ -1400,7 +1400,7 @@ function vpn_l2tp_configure() { if (!is_dir("{$g['varetc_path']}/l2tp-vpn")) mkdir("{$g['varetc_path']}/l2tp-vpn"); - if ($g['booting']) { + if (platform_booting()) { if (!$l2tpcfg['mode'] || ($l2tpcfg['mode'] == "off")) return 0; @@ -1581,7 +1581,7 @@ EOD; break; } - if ($g['booting']) + if (platform_booting()) echo "done\n"; return 0; |