summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-11 19:11:52 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-11 19:11:52 +0000
commite7df76d294202c1ea18814746b7f200c4274e98c (patch)
tree8f9941e9619dff5efe89a162b7b3a762c11ba619
parent5f81609ab39a24952bb6ec09916ffdddc34308fb (diff)
downloadpfsense-e7df76d294202c1ea18814746b7f200c4274e98c.zip
pfsense-e7df76d294202c1ea18814746b7f200c4274e98c.tar.gz
This may break booting so try only 100 times and fail gracely in case of error.
-rw-r--r--etc/inc/pfsense-utils.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 3aeb77e..bf7587c 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1016,8 +1016,16 @@ function auto_login() {
$getty_split = split("\n", $gettytab);
conf_mount_rw();
$fd = false;
- while (!$fd) {
+ $tries = 0;
+ while (!$fd && $tries < 100) {
$fd = fopen("/etc/gettytab", "w");
+ $tries++;
+
+ }
+ if (!$fd) {
+ conf_mount_ro();
+ log_error("Enableing auto login was not possible.");
+ return;
}
foreach($getty_split as $gs) {
if(stristr($gs, ":ht:np:sp#115200") ) {
OpenPOWER on IntegriCloud