summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/ipxe/controllers/AuthController.php32
1 files changed, 9 insertions, 23 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php
index 2375570..44fafbf 100644
--- a/application/modules/ipxe/controllers/AuthController.php
+++ b/application/modules/ipxe/controllers/AuthController.php
@@ -81,18 +81,13 @@ class Ipxe_AuthController extends Zend_Controller_Action
header('Content-Type: text/plain');
$result = "#!ipxe\n";
- $result .= "imgfree\n";
if(isset($this->session)){
+ $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/$this->error\n";
$result .= ":start\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/$this->error\n";
- $result .= "clear username\n";
- $result .= "clear password\n";
- $result .= ":login\n";
- $result .= "imgselect login || goto start\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/login\n";
- $result .= "goto login\n";
+ $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 \${filename}\n";
+ $result .= "goto start\n";
}else{
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/serialnumer/$serialnumber/mac/$mac/error/$this->error\n";
+ $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/serialnumber/$serialnumber/mac/$mac/error/$this->error\n";
}
header("Content-Length: ".(strlen($result)));
echo $result;
@@ -103,21 +98,14 @@ class Ipxe_AuthController extends Zend_Controller_Action
{
$alpha = $this->_request->getParam('alpha');
$login = $this->_request->getParam('login');
- $error = $this->_request->getParam('error');
-
- if (isset($error)){
- header('Content-Type: text/plain');
- $result = "error";
- header("Content-Length: ".(strlen($result)));
- echo $result;
- exit;
- }
if (isset($login)){
header('Content-Type: text/plain');
$result = "#!ipxe\n";
+ $result .= "clear username\n";
+ $result .= "clear password\n";
$result .= "login\n";
- $result .= "isset \${username} || set username \n";
+ $result .= "isset \${username} || set username null\n";
$result .= "chain http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n";
header("Content-Length: ".(strlen($result)));
echo $result;
@@ -128,8 +116,7 @@ class Ipxe_AuthController extends Zend_Controller_Action
header('WWW-Authenticate: Basic realm=""');
header('HTTP/1.0 401 Unauthorized');
$result = "#!ipxe\n";
- $result .= "imgfree\n";
- $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/login\n";
+ $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/login\n";
header("Content-Length: ".(strlen($result)));
echo $result;
exit;
@@ -170,8 +157,7 @@ class Ipxe_AuthController extends Zend_Controller_Action
header('Content-Type: text/plain');
$result = "#!ipxe\n";
- $result .= "imgfree\n";
- $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/".$this->error."\n";
+ $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/".$this->error."\n";
header("Content-Length: ".(strlen($result)));
echo $result;
exit;