-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstep3.php
47 lines (38 loc) · 1.04 KB
/
step3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
if (isset($_POST['kernel']) &&
(isset($_POST['modules'])) &&
!isset($_POST['packages'])) {
if (isset($_POST['selected'])) {
upload("mypackages");
$last = count($_POST['selected'])-1;
if ($_POST['selected'][$last] == "uploaded") {
unset($_POST['selected'][$last]);
}
$_POST['packages'] = $_POST['modules'].' '.implode(" ",$_POST['selected']);
unset($_POST['selected']);
}
}
if (isset($_POST['kernel']) &&
(isset($_POST['modules'])) &&
!isset($_POST['packages'])) {
mkdir($_POST["tmp_dir"]."/fs");
if ($_POST['kernel'] != "custom") {
shell_exec("sudo ./helper --pre-install ".$_POST['kernel'].
" ".$_POST['tmp_dir']);
}
?>
<div class="box">
<h3>[Step 3/5] Additional RAM filesystem</h3>
<form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="packages">
<?php
echo shell_exec("./helper --list-pkgs ".$_POST["tmp_dir"]);
post_hidden();
?>
<div align="center">
<input name="continue" value="Continue" type="submit" />
</div>
</form>
</div>
<?php
}
?>