summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-11-06 11:58:26 +0000
committerErmal <eri@pfsense.org>2011-11-06 11:58:26 +0000
commitabf421ce089adfb0962085c2201609be89520a65 (patch)
treefa0bc6e2dde8ddadaa37aeef90021ff288ad41e6 /etc/inc/voucher.inc
parent6cf64278ee3d2ffd01be1ee2066f5c8dded36072 (diff)
downloadpfsense-abf421ce089adfb0962085c2201609be89520a65.zip
pfsense-abf421ce089adfb0962085c2201609be89520a65.tar.gz
Issue proper start and error messages during voucher loading
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index b06e4d4..dc7f613 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -462,8 +462,16 @@ function voucher_configure($sync = false) {
if (is_array($config['voucher'])) {
foreach ($config['voucher'] as $voucherzone => $vcfg) {
+ if ($g['booting'])
+ echo gettext("Enabling voucher support... ");
$cpzone = $voucherzone;
- voucher_configure_zone($sync);
+ $error = voucher_configure_zone($sync);
+ if ($g['booting']) {
+ if ($error)
+ echo "error\n";
+ else
+ echo "done\n";
+ }
}
}
}
@@ -474,8 +482,6 @@ function voucher_configure_zone($sync = false) {
if (!isset($config['voucher'][$cpzone]['enable']))
return 0;
- if ($g['booting'])
- echo "Enabling voucher support... ";
if ($sync == true)
captiveportal_syslog("Writing voucher db from sync data...");
@@ -531,8 +537,6 @@ function voucher_configure_zone($sync = false) {
}
unlock($voucherlck);
- if ($g['booting'])
- echo "done\n";
}
return 0;
OpenPOWER on IntegriCloud