summaryrefslogtreecommitdiffstats
path: root/usr/local/www/installer
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-12-21 19:26:34 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-12-21 19:26:34 -0500
commitbfff9331f9d8acde43ee5a625aac3ef4286e3db3 (patch)
tree63f314228ed0dfb924dd58ca4265382e2c4d838f /usr/local/www/installer
parent5a04b6d852a4528bdf814596364e639486ceed01 (diff)
downloadpfsense-bfff9331f9d8acde43ee5a625aac3ef4286e3db3.zip
pfsense-bfff9331f9d8acde43ee5a625aac3ef4286e3db3.tar.gz
nuke the leave one megabyte free on each disk business.
Diffstat (limited to 'usr/local/www/installer')
-rw-r--r--usr/local/www/installer/installer.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php
index f0dbb38..6a18686 100644
--- a/usr/local/www/installer/installer.php
+++ b/usr/local/www/installer/installer.php
@@ -177,6 +177,7 @@ function pcsysinstall_get_disk_info($diskname) {
if($di_s[0])
$tmp_array[$di_s[0]] = $di_s[1];
}
+ $tmp_array['size']--;
$tmp_array['disk'] = trim($disks_info[0]);
$tmp_array['desc'] = trim(htmlentities($disks_info[1]));
return $tmp_array;
@@ -200,6 +201,7 @@ function installer_find_all_disks() {
if($di_s[0])
$tmp_array[$di_s[0]] = $di_s[1];
}
+ $tmp_array['size']--;
$tmp_array['disk'] = trim($disks_info[0]);
$tmp_array['desc'] = trim(htmlentities($disks_info[1]));
$disks_array[] = $tmp_array;
@@ -771,7 +773,7 @@ function installer_custom() {
\$('disktotals').disabled = 1;
\$('disktotals').setStyle({color:'#000000'});
var remaining = parseInt(\$('disktotals').value) - parseInt(\$('totalsize').value);
- if(remaining == disksseen) {
+ if(remaining == 0) {
if(\$('totalsize'))
\$('totalsize').setStyle({
background:'#00FF00',
@@ -791,6 +793,13 @@ function installer_custom() {
color:'#000000'
});
}
+ if(\$('availalloc')) {
+ \$('availalloc').value = remaining;
+ \$('availalloc').setStyle({
+ background:'#FFFFFF',
+ color:'#000000'
+ });
+ }
}
}
}
@@ -912,8 +921,6 @@ EOF;
$disk_info = pcsysinstall_get_disk_info($first_disk);
$size = $disk_info['size'];
$first_disk_size = $size - $swap_size;
- // Decreate by 1 megabyte as some disks will fail
- $first_disk_size--;
// Debugging
echo "\n\n<!-- $first_disk - " . print_r($disk_info, true) . " - $size - $first_disk_size -->\n\n";
@@ -941,6 +948,7 @@ EOF;
// tfoot and tbody are used by rowhelper
$custom_txt .= "</tr>";
$custom_txt .= "<tfoot></tfoot></tbody>";
+ // Total allocation box
$custom_txt .= "<tr><td></td><td></td><td align='right'>Total allocated:</td><td><input style='border:0px; background-color: #FFFFFF;' size='8' id='totalsize' name='totalsize'></td>";
// Add row button
$custom_txt .= "</td><td>&nbsp;</td><td>";
@@ -949,9 +957,10 @@ EOF;
$custom_txt .= "<img border=\"0\" src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" alt=\"\" title=\"add another entry\" /></a>";
$custom_txt .= "</div>";
$custom_txt .= "</td></tr>";
-
-
+ // Disk capacity box
$custom_txt .= "<tr><td></td><td></td><td align='right'>Disk(s) capacity total:</td><td><input style='border:0px; background-color: #FFFFFF;' size='8' id='disktotals' name='disktotals'></td></tr>";
+ // Remaining allocation box
+ $custom_txt .= "<tr><td></td><td></td><td align='right'>Available space for allocation:</td><td><input style='border:0px; background-color: #FFFFFF;' size='8' id='availalloc' name='availalloc'></td></tr>";
$custom_txt .= "</table>";
$custom_txt .= "<script type=\"text/javascript\">row_helper_dynamic_custom();</script>";
}
@@ -991,7 +1000,6 @@ EOF;
<br/>* Sizes are in megabytes.
<br/>* Encryption password field should only be used if a encrypted filesystem (.eli) was chosen
<br/>* Mount points named /conf are not allowed. Use /cf if you want to make a configuration slice/mount.
- <br/>* Leave at least one megabyte <strong>unallocated on each disk</strong> to avoid errors
{$restored_layout_txt}
</span>
</strong>
OpenPOWER on IntegriCloud