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/globals.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/globals.inc')
-rw-r--r-- | etc/inc/globals.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index aa6b5e3..1bd832b 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -165,10 +165,17 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024", if (file_exists("/etc/inc/globals_override.inc")) @include("globals_override.inc"); -if (file_exists("{$g['varrun_path']}/booting")) - $g['booting'] = true; -else - unset($g['booting']); +function platform_booting() { + global $g; + + if (file_exists("{$g['varrun_path']}/booting")) + return true; + + if ($g['booting']) + return true; + + return false; +} $config_parsed = false; |