diff options
| author | michael pereira | 2011-10-31 00:38:10 +0100 |
|---|---|---|
| committer | michael pereira | 2011-10-31 00:38:10 +0100 |
| commit | b7abfed3745003ff50b194130247e4acb6250b67 (patch) | |
| tree | 0ec4ba9507095c20972c437a971b03e2d02d9470 | |
| parent | login (diff) | |
| download | pbs2-b7abfed3745003ff50b194130247e4acb6250b67.tar.gz pbs2-b7abfed3745003ff50b194130247e4acb6250b67.tar.xz pbs2-b7abfed3745003ff50b194130247e4acb6250b67.zip | |
login
| -rw-r--r-- | application/modules/ipxe/controllers/AuthController.php | 32 |
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; |
