From b526ca11a534a4f4df2eb4ae4336c3a7f22eba37 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 17 Dec 2010 22:00:22 -0500 Subject: Unbreak more than 2 slices --- usr/local/www/installer/installer.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php index aee2e61..b9ac3e1 100644 --- a/usr/local/www/installer/installer.php +++ b/usr/local/www/installer/installer.php @@ -444,7 +444,9 @@ function verify_before_install() { $bootmanager = htmlspecialchars($_REQUEST['bootmanager']); $disks = array(); // Loop through posted items and create an array - for($x=1; isset($_REQUEST['fstype' . $x]); $x++) { + for($x=0; $x<99; $x++) { + if(!$_REQUEST['fstype' . $x]) + continue; $tmparray = array(); if($_REQUEST['fstype'] <> "SWAP") $tmparray['mountpoint'] = $_REQUEST['mountpoint' . $x]; @@ -655,6 +657,7 @@ EOF; function installer_custom() { global $g, $fstype; + global $select_txt, $custom_disks; if(file_exists("/tmp/.pc-sysinstall/pc-sysinstall.log")) unlink("/tmp/.pc-sysinstall/pc-sysinstall.log"); head_html(); @@ -759,8 +762,8 @@ EOF; $size = $disk_info['size']; $first_disk_size = $size - 256; echo "\n\n\n\n"; - $custom_txt .= return_rowhelper_row("1", "/", "UFS", $first_disk, "{$first_disk_size}", ""); - $custom_txt .= return_rowhelper_row("2", "none", "SWAP", $first_disk, "256", ""); + $custom_txt .= return_rowhelper_row("0", "/", "UFS", $first_disk, "{$first_disk_size}", ""); + $custom_txt .= return_rowhelper_row("1", "none", "SWAP", $first_disk, "256", ""); $custom_txt .= ""; $custom_txt .= ""; @@ -897,7 +900,7 @@ EOF; } function return_rowhelper_row($rownum, $mountpoint, $fstype, $disk, $size, $encpass) { - global $g; + global $g, $select_txt, $custom_disks; // Slice #2 - SWAP // Mount point $disks = installer_find_all_disks(); @@ -922,6 +925,7 @@ function return_rowhelper_row($rownum, $mountpoint, $fstype, $disk, $size, $encp $types['ZFS.eli'] = "Encrypted Zetabyte Filesystem"; } $custom_txt .= "\n"; $custom_txt .= ""; $custom_txt .= "