Revision 285ef132
Added by Ermal Luçi over 10 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
186 | 186 |
|
187 | 187 |
if (isset($cpcfg['enable'])) { |
188 | 188 |
|
189 |
if ($g['booting']) {
|
|
189 |
if (platform_booting()) {
|
|
190 | 190 |
echo "Starting captive portal({$cpcfg['zone']})... "; |
191 | 191 |
|
192 | 192 |
/* remove old information */ |
... | ... | |
332 | 332 |
unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); |
333 | 333 |
captiveportal_init_radius_servers(); |
334 | 334 |
|
335 |
if ($g['booting']) {
|
|
335 |
if (platform_booting()) {
|
|
336 | 336 |
/* send Accounting-On to server */ |
337 | 337 |
captiveportal_send_server_accounting(); |
338 | 338 |
echo "done\n"; |
... | ... | |
349 | 349 |
captiveportal_radius_stop_all(); |
350 | 350 |
|
351 | 351 |
/* send Accounting-Off to server */ |
352 |
if (!$g['booting']) {
|
|
352 |
if (!platform_booting()) {
|
|
353 | 353 |
captiveportal_send_server_accounting(true); |
354 | 354 |
} |
355 | 355 |
|
... | ... | |
1045 | 1045 |
* easy such as hostname vs ip address add this check |
1046 | 1046 |
*/ |
1047 | 1047 |
if ($ishostname === true) { |
1048 |
if (!$g['booting']) {
|
|
1048 |
if (!platform_booting()) {
|
|
1049 | 1049 |
$ipaddress = gethostbyname($ipent['hostname']); |
1050 | 1050 |
if (!is_ipaddr($ipaddress)) |
1051 | 1051 |
return; |
Also available in: Unified diff
Rather than set the g['booting'] on globals provide a function to test for that doing the right checks