summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authormichael pereira2011-03-11 10:02:36 +0100
committermichael pereira2011-03-11 10:02:36 +0100
commit4ec30e83c446ddf0758f015d9ad5c5aebd2f0ca6 (patch)
tree12b382b5eba4b864825875df9f36a7026f95a18d /application/controllers
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-4ec30e83c446ddf0758f015d9ad5c5aebd2f0ca6.tar.gz
pbs2-4ec30e83c446ddf0758f015d9ad5c5aebd2f0ca6.tar.xz
pbs2-4ec30e83c446ddf0758f015d9ad5c5aebd2f0ca6.zip
bootos getressources
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/BootosController.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/application/controllers/BootosController.php b/application/controllers/BootosController.php
index 37886b4..3a7ab90 100644
--- a/application/controllers/BootosController.php
+++ b/application/controllers/BootosController.php
@@ -10,6 +10,7 @@ class BootosController extends Zend_Controller_Action
public function indexAction()
{
+
$bootosmapper = new Application_Model_BootOsMapper();
$groupmapper = new Application_Model_GroupMapper();
@@ -50,13 +51,21 @@ class BootosController extends Zend_Controller_Action
$bootos->setCreated(time());
try {
- $bootosmapper->save($bootos);
+ $bootosID = $bootosmapper->save($bootos);
+
+ $initpath = "../resources/bootos/".$bootosID."/initramfs/";
+ $kernelpath = "../resources/bootos/".$bootosID."/kernel/";
+
+ exec("wget -P ".$kernelpath." ".$bootos->getPath_kernel());
+ exec("wget -P ".$initpath." ".$bootos->getPath_init());
+
}catch(Zend_Exception $e)
{
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
}
+
$this->_redirect('/bootos');
}
}