summaryrefslogtreecommitdiffstats
path: root/application/modules/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/ipxe')
-rw-r--r--application/modules/ipxe/controllers/AuthController.php9
-rw-r--r--application/modules/ipxe/controllers/ResourceController.php1
-rw-r--r--application/modules/ipxe/views/scripts/resource/getvesamenu.phtml8
3 files changed, 15 insertions, 3 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php
index 0492339..bedd202 100644
--- a/application/modules/ipxe/controllers/AuthController.php
+++ b/application/modules/ipxe/controllers/AuthController.php
@@ -34,6 +34,7 @@ class Ipxe_AuthController extends Zend_Controller_Action
{
$serialnumber = $this->_request->getParam('serialnumber');
$mac = $this->_request->getParam('mac');
+ $login = $this->_request->getParam('login');
if(isset($serialnumber)){
// Create a session
@@ -69,9 +70,13 @@ class Ipxe_AuthController extends Zend_Controller_Action
$result = "#!ipxe\n";
$result .= "imgfree\n";
- $result .= "login\n";
+ if(isset($login)){
+ $result .= "login\n";
+ }else{
+ $login = false;
+ }
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenu/alpha/".$session->getAlphasessionID()." http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$session->getAlphasessionID();
+ $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenu/alpha/".$session->getAlphasessionID()." http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$session->getAlphasessionID()."/login/".$login;
header("Content-Length: ".(strlen($result)));
diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php
index 6884aa1..ed317ce 100644
--- a/application/modules/ipxe/controllers/ResourceController.php
+++ b/application/modules/ipxe/controllers/ResourceController.php
@@ -87,6 +87,7 @@ class Ipxe_ResourceController extends Zend_Controller_Action
$vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/');
$vesamenuView->username = $_SERVER['PHP_AUTH_USER'];
$vesamenuView->password = $_SERVER['PHP_AUTH_PW'];
+ $vesamenuView->login = $this->_request->getParam('login');
$vesamenuView->host = $_SERVER['HTTP_HOST'];
$_SESSION['alphasessionID'] = $this->thisSession->getAlphasessionID();
diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
index 7dcb3b8..597c0c2 100644
--- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
+++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
@@ -40,7 +40,8 @@
echo "label failed\n";
echo " menu label Authentication Failed\n";
echo " menu disable\n";
- uriboot ( "Try again", "ipxe.php", "" );
+ uriboot ( "Try again", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/true", "" );
+ uriboot ( "Return to Group Bootmenu", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123", "" );
}
function authenticated ($username, $password) {
@@ -122,6 +123,11 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none
}
}
+ if($this->login == false){
+ uriboot ( "Login", "http://$this->host/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/true", "" );
+ texthelp("Login to get your own Bootmenu.");
+ }
+
localboot();
}