[PC-BSD Commits] r2081 - pcbsd/trunk/PCInstall

svn at pcbsd.org svn at pcbsd.org
Tue Jun 10 09:12:45 PDT 2008


Author: kris
Date: 2008-06-10 09:12:44 -0700 (Tue, 10 Jun 2008)
New Revision: 2081

Modified:
   pcbsd/trunk/PCInstall/pcinstall.ui.h
Log:

Updated PCInstall to support ZFS / including creating a /bootdir directory
as UFS, so we can boot with the rest of the disk as ZFS



Modified: pcbsd/trunk/PCInstall/pcinstall.ui.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui.h	2008-06-10 14:45:57 UTC (rev 2080)
+++ pcbsd/trunk/PCInstall/pcinstall.ui.h	2008-06-10 16:12:44 UTC (rev 2081)
@@ -464,8 +464,8 @@
     
     if(ok == 0)
     {
-	linePassword->setPaletteBackgroundColor(colourWhite);
-	linePassword2->setPaletteBackgroundColor(colourWhite);
+	linePassword->unsetPalette();
+	linePassword2->unsetPalette();
 	textAcctNotify->setText("");
 	setNextEnabled(currentPage(), TRUE);	
     } else {
@@ -1092,8 +1092,8 @@
     int i = 2;
     QString PartLetter;
     
-    // Use a custom disk label
-    if ( checkCustomPartition->isChecked() && checkCustomDiskSlice->isChecked() )
+    // Use a custom disk label if the user selected it, or if we are using ZFS since we need a seperate /boot filesystem
+    if ( checkCustomPartition->isChecked() && checkCustomDiskSlice->isChecked() || comboFileSystem->currentItem() == 3 )
     {
 	    QFile file( "/tmp/BSDLabel" );
 	    if ( file.open( IO_WriteOnly ) ) {
@@ -1161,7 +1161,6 @@
     }
     
     
-  //  QMessageBox::warning( this, "PCBSD Installer",  "running writelabel", "Retry", "Quit", 0, 0, 1 );
         
     	    textFileProgress->setText(tr("Writing BSD Label to ") + RootPartition);
 	    installProgress->setProgress(3);
@@ -1556,8 +1555,8 @@
     QString Type;
     
     listViewSlices->clear();
+
     
-    
     if ( checkBoxEntireDisk->isChecked() )
     {
 	tmp= listDriveBox->currentText();
@@ -1608,7 +1607,6 @@
 	   }
 	
 	
-	//listBoxSlices->insertItem(Device + PartLetter + "   on " + SliceMnt[i] +  " - " + SliceMB[i] + "MB");
 	(void) new QListViewItem( listViewSlices, Device + PartLetter, SliceMnt[i], SliceMB[i] + " MB", Type );
 
 	
@@ -1659,22 +1657,36 @@
 	TotalSliceMB = PartitionMB[SelPartition];	    
     }
 	
-    
-    
+    // Check if we are using ZFS and create a 100MB /bootdir slice
+    if ( comboFileSystem->currentItem() == 3 )
+    {
+	    SliceMB[0] = tmp.setNum((TotalSliceMB.toLongLong() - 712));
+	    SliceMnt[0] = "/";
+	    SliceMB[1] = "512";
+	    SliceMnt[1] = "SWAP";
+	    SliceMB[2] = "200";
+	    SliceMnt[2] = "/bootdir";
+	    SliceMB[3] = "";
+	    SliceMnt[3] = "";
+	    SliceMB[4] = "";
+	    SliceMnt[4] = "";
+	    SliceMB[5] = "";
+	    SliceMnt[5] = "";
+    } else {
+	SliceMB[0] = tmp.setNum((TotalSliceMB.toLongLong() - 512));
+	SliceMnt[0] = "/";
+	SliceMB[1] = "512";
+	SliceMnt[1] = "SWAP";
+	SliceMB[2] = "";
+	SliceMnt[2] = "";
+	SliceMB[3] = "";
+	SliceMnt[3] = "";
+	SliceMB[4] = "";
+	SliceMnt[4] = "";
+	SliceMB[5] = "";
+	SliceMnt[5] = ""; 
+   }
 
-    SliceMB[0] = tmp.setNum((TotalSliceMB.toLongLong() - 512));
-    SliceMnt[0] = "/";
-    SliceMB[1] = "512";
-    SliceMnt[1] = "SWAP";
-    SliceMB[2] = "";
-    SliceMnt[2] = "";
-    SliceMB[3] = "";
-    SliceMnt[3] = "";
-    SliceMB[4] = "";
-    SliceMnt[4] = "";
-    SliceMB[5] = "";
-    SliceMnt[5] = "";
-
     
 	
 }
@@ -1723,6 +1735,7 @@
 
     if ( listViewSlices->currentItem() != 0)
     {
+	
 	while ( ! SliceMB[i].isEmpty() )
 	{
 	    UsedMB = UsedMB + SliceMB[i].toLongLong();
@@ -1772,6 +1785,11 @@
 	    QMessageBox::information( this, tr("DiskLabel Error:"), tr("You cannot remove the 'SWAP' partition. ") );
 	    return;
 	}
+	if (listViewSlices->currentItem()->text(1) == "/bootdir" )
+	{
+	    QMessageBox::information( this, tr("DiskLabel Error:"), tr("You cannot remove the '/bootdir' partition. ") );
+	    return;
+	}
 
 	while ( ! SliceMnt[i].isEmpty() )
 	{
@@ -2183,9 +2201,9 @@
 {
     bool ok = TRUE;
     textAcctNotify->setText("");
+
+    lineUserName->unsetPalette();
     
-    lineUserName->setPaletteBackgroundColor(colourWhite);
-    
             // Check if we are missing  some values
     if ( lineUserName->text().isEmpty() )
     {



More information about the Commits mailing list