diff options
Diffstat (limited to 'frontend/modules/gentoo/step3.php')
-rw-r--r-- | frontend/modules/gentoo/step3.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/frontend/modules/gentoo/step3.php b/frontend/modules/gentoo/step3.php index a4f1b30..dd2d72c 100644 --- a/frontend/modules/gentoo/step3.php +++ b/frontend/modules/gentoo/step3.php @@ -1,4 +1,5 @@ <?php +global $S; $opts=explode(' ', $this->get_opt('options')); if (in_array('timezone', $opts)) $this->select('timezone', 'timezone', 'Timezone', get_timezones()); @@ -18,6 +19,24 @@ if (strlen($pkgsets=$this->get_opt('pkgsets'))) { $this->checkbox_array('pkgset-'.$pkgset->id, 'pkgset-'.$pkgset->id, $pkgset->name, $pkgs); } } +if (in_array('pruneinit', $opts)) { + $r=$S['pdo']->query('SELECT * FROM `gentoo_baseinit` WHERE `profile`='.$profile->id.' ORDER BY `name`, `runlevel`'); + $scripts=array(); + while ($script=$r->fetch(PDO::FETCH_ASSOC)) { + $script=new sql_gentoo_baseinit($script); + $scripts["$script->name:$script->runlevel"]="$script->name ($script->runlevel)"; + } + $this->checkbox_array('pruneinit', 'pruneinit', 'Remove the following init scripts', $scripts); +} +if ($this->get_opt('basesystem') == 'manual') { + $r=$S['pdo']->query('SELECT * FROM `gentoo_basepkgs` WHERE `profile`='.$profile->id.' ORDER BY `pkg`'); + $pkgs=array(); + while ($pkg=$r->fetch(PDO::FETCH_ASSOC)) { + $pkg=$pkg['pkg']; + $pkgs[$pkg]=$pkg; + } + $this->checkbox_array('prunepkgs', 'prunepkgs', 'Remove the following packages from the base system', $pkgs); +} // TODO This shouldn't be a step at all, it should be in wizard.php to choose between bundlers // TODO This shouldn't be part of configurations, except possibly a default value. It should be for builds $this->select('bundler', 'bundler', 'Image type', array( |