summaryrefslogtreecommitdiffstats
path: root/application/modules/ipxe
diff options
context:
space:
mode:
authormichael pereira2011-07-11 01:41:53 +0200
committermichael pereira2011-07-11 01:41:53 +0200
commite69dbd85edbecc8c51d6d455211669823e8facc3 (patch)
treece2bb30269114f86bc7cc3e69e1b1e9a96182292 /application/modules/ipxe
parentSession und Filter fuer ipxe Bootmenu (diff)
downloadpbs2-e69dbd85edbecc8c51d6d455211669823e8facc3.tar.gz
pbs2-e69dbd85edbecc8c51d6d455211669823e8facc3.tar.xz
pbs2-e69dbd85edbecc8c51d6d455211669823e8facc3.zip
Session und Filter fuer ipxe Bootmenu
Diffstat (limited to 'application/modules/ipxe')
-rw-r--r--application/modules/ipxe/controllers/ResourceController.php26
-rw-r--r--application/modules/ipxe/views/scripts/resource/getvesamenu.phtml4
2 files changed, 28 insertions, 2 deletions
diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php
index 0d1428a..7589d70 100644
--- a/application/modules/ipxe/controllers/ResourceController.php
+++ b/application/modules/ipxe/controllers/ResourceController.php
@@ -112,6 +112,32 @@ class Ipxe_ResourceController extends Zend_Controller_Action
}
+ public function startAction(){
+ $file = $this->_request->getParam('file');
+ if($file == 'kernel'){
+ $bootmenuntryID = $this->_request->getParam('bme');
+ $a = $_SESSION['alphasessionID'];
+ $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
+ $bootmenuentry = new Application_Model_BootMenuEntries();
+ $bootmenuentriesMapper->find($bootmenuntryID,$bootmenuentry);
+
+ $sessionMapper = new Application_Model_SessionMapper();
+ $session_k = $sessionMapper->findBy(array('alphasessionID' => $a),true);
+
+ $session = new Application_Model_Session();
+ $session->setOptions($session_k[0]);
+ $session->setID($session_k[0]['sessionID']);
+
+ $session->setBootmenuentryID($bootmenuntryID);
+ $session->setBootosID($bootmenuentry->getBootosID());
+ $sessionMapper->save($session);
+
+ $this->_redirect('/resource/getkernel/alpha/'.$session->getAlphasessionID());
+ }
+
+
+ }
+
}
diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
index cb440cb..3e74957 100644
--- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
+++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
@@ -125,10 +125,10 @@ if(isset($this->bmelist)){
if($bme->getKcl() && $kcl != null){
uriboot ( $bme->getTitle(),
- "http://$this->host/resource/getkernel/alpha/$this->alphaID/file/kernel", "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend());
+ "http://$this->host/ipxe/start/alpha/$this->alphaID/bme/$bme->getId()", "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend());
}else{
uriboot ( $bme->getTitle(),
- "http://$this->host/resource/getkernel/alpha/$this->alphaID/file/kernel", "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend());
+ "http://$this->host/ipxe/start/alpha/$this->alphaID/bme/$bme->getId()", "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend());
}
}
}