From: <cod...@go...> - 2008-08-25 14:23:31
|
Author: M0E.lnx Date: Mon Aug 25 07:23:16 2008 New Revision: 141 Modified: branches/iVL/.lang/ClsPartSel.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/MdlConfLilo.module branches/iVL/MdlDiskPart.module branches/iVL/MdlPartSel.module Log: - Modified the partition listing / size detection to fix a problem where some partitions were not listing their size - Changes to the gparted embedder again (this time using a more liberal WM_CLASS string - Fixed typo in MdlLiloconfig line 123 Modified: branches/iVL/.lang/ClsPartSel.pot ============================================================================== --- branches/iVL/.lang/ClsPartSel.pot (original) +++ branches/iVL/.lang/ClsPartSel.pot Mon Aug 25 07:23:16 2008 @@ -1,4 +1,4 @@ -# /home/uel/svn-installer/ClsPartSel.class +# /home/moe/area-51/projects/installer/ClsPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlDiskPart.pot ============================================================================== --- branches/iVL/.lang/MdlDiskPart.pot (original) +++ branches/iVL/.lang/MdlDiskPart.pot Mon Aug 25 07:23:16 2008 @@ -1,4 +1,4 @@ -# /home/uel/svn-installer/MdlDiskPart.module +# /home/moe/area-51/projects/installer/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPartSel.pot ============================================================================== --- branches/iVL/.lang/MdlPartSel.pot (original) +++ branches/iVL/.lang/MdlPartSel.pot Mon Aug 25 07:23:16 2008 @@ -1,4 +1,4 @@ -# /home/uel/svn-installer/MdlPartSel.module +# /home/moe/area-51/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/MdlConfLilo.module ============================================================================== --- branches/iVL/MdlConfLilo.module (original) +++ branches/iVL/MdlConfLilo.module Mon Aug 25 07:23:16 2008 @@ -120,7 +120,7 @@ DIM sTarget AS String DIM sDump AS String - SHELL "probedisk | grep -v cdrom |cut -f 1 -d \\|" TO sList + SHELL "probedisk | grep -v cdrom |cut -f 1 -d \'|\'" TO sList sList = Trim(sList) sListarr = Split(sList, "\n") FOR i = 0 TO sListarr.count - 1 Modified: branches/iVL/MdlDiskPart.module ============================================================================== --- branches/iVL/MdlDiskPart.module (original) +++ branches/iVL/MdlDiskPart.module Mon Aug 25 07:23:16 2008 @@ -57,7 +57,7 @@ SHELL "/usr/sbin/gparted" WAIT 1 - aHandle = Desktop.Find("", "*partedbi*", "") + aHandle = Desktop.Find("", "*parted*", "") i = 0 IF aHandle.Count = 0 THEN 'lets give it a chance to start REPEAT Modified: branches/iVL/MdlPartSel.module ============================================================================== --- branches/iVL/MdlPartSel.module (original) +++ branches/iVL/MdlPartSel.module Mon Aug 25 07:23:16 2008 @@ -40,6 +40,7 @@ DIM iCol1, icol2, iCol3 AS Integer DIM sSwaps AS String[] DIM ii AS Integer + DIM sDrive, sPartNo, sBlank AS String ' fire up the arrays oFsTypes = NEW Object[] oMountPoints = NEW Object[] @@ -90,19 +91,29 @@ FOR i = 0 TO sPartList.Count - 1 + sDrive = Left(sPartList[i], Len("/dev/hda")) + sPartNo = Right(sPartList[i], Len(sPartList[i]) - Len(sDrive)) + IF Len(sPartNo) > 1 THEN + sBlank = "" + ELSE + sBlank = " " + END IF + + sPart = Right(sPartList[i], Len(sPartList[i]) - RInStr(sPartList[i], "/")) 'Message.Info(sPart) - 'make sure the mount point exists - IF IsDir("/mnt" &/ sPart) = FALSE THEN - SHELL "mkdir /mnt" &/ sPart WAIT - END IF - ' Now mount the partition - SHELL "mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT - ' get the size using df -h | grep sPart and some sed - ' will embed some bash, but should probabbly be fixed - SHELL "export " & sPart & "=$(df -h | grep " & sPart & ") && echo $" & sPart & " | cut -f 2 -d \' \'" TO sSize - 'Message(sPart & Space(1) & "[ " & Trim(sSize) & " ]") + ' ' ' 'make sure the mount point exists + ' ' ' IF IsDir("/mnt" &/ sPart) = FALSE THEN + ' ' ' SHELL "mkdir /mnt" &/ sPart WAIT + ' ' ' END IF + ' ' ' ' Now mount the partition + ' ' ' SHELL "mount " & Trim(sPartList[i]) & Space(1) & "/mnt" &/ sPart WAIT + ' ' ' ' get the size using df -h | grep sPart and some sed + ' ' ' ' will embed some bash, but should probabbly be fixed + ' ' ' SHELL "export " & sPart & "=$(df -h | grep " & sPart & ") && echo $" & sPart & " | cut -f 2 -d \' \'" TO sSize + ' ' ' 'Message(sPart & Space(1) & "[ " & Trim(sSize) & " ]") + SHELL "export size=$(parted " & sDrive & " print | grep ^\'" & sBlank & sPartNo & "\'); echo $size | cut -f 4 -d \' \'" TO sSize 'create the label and the drop down box here tl = NEW TextLabel(FrmPartSel.scrollPartitions) AS "Labels" WITH tl @@ -181,7 +192,7 @@ ' now umount the partition and delete the mount point - SHELL "umount /mnt" &/ sPart & " && rm -r /mnt" &/ sPart WAIT + 'SHELL "umount /mnt" &/ sPart & " && rm -r /mnt" &/ sPart WAIT ' increase the value of y for the next label y = y + tl.Height + 4 |