diff options
Diffstat (limited to 'application/controllers/BootosController.php')
| -rw-r--r-- | application/controllers/BootosController.php | 11 |
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'); } } |
