|
From: <cod...@go...> - 2008-07-14 20:33:39
|
Author: M0E.lnx
Date: Mon Jul 14 13:32:23 2008
New Revision: 39
Added:
branches/iVL/ClsPartSel.class
Modified:
branches/iVL/.lang/#project.pot
branches/iVL/.lang/ClsGlobal.pot
branches/iVL/.lang/FMain.pot
branches/iVL/.lang/FrmDiskPart.pot
branches/iVL/.lang/FrmLicense.pot
branches/iVL/.lang/FrmPartScheme.pot
branches/iVL/.lang/FrmPartSel.pot
branches/iVL/.lang/FrmSelISO.pot
branches/iVL/.lang/MdlCore.pot
branches/iVL/.lang/MdlDiskPart.pot
branches/iVL/.lang/MdlObjSizer.pot
branches/iVL/.lang/MdlPartSel.pot
branches/iVL/.lang/MdlSetup.pot
branches/iVL/FrmPartSel.class
branches/iVL/MdlPartSel.module
branches/iVL/MdlSetup.module
Log:
Moving towards partition selection module
Modified: branches/iVL/.lang/#project.pot
==============================================================================
--- branches/iVL/.lang/#project.pot (original)
+++ branches/iVL/.lang/#project.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/.project
+# /home/moises/area-51/projects/installer/.project
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/ClsGlobal.pot
==============================================================================
--- branches/iVL/.lang/ClsGlobal.pot (original)
+++ branches/iVL/.lang/ClsGlobal.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/ClsGlobal.class
+# /home/moises/area-51/projects/installer/ClsGlobal.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FMain.pot
==============================================================================
--- branches/iVL/.lang/FMain.pot (original)
+++ branches/iVL/.lang/FMain.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FMain.class
+# /home/moises/area-51/projects/installer/FMain.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmDiskPart.pot
==============================================================================
--- branches/iVL/.lang/FrmDiskPart.pot (original)
+++ branches/iVL/.lang/FrmDiskPart.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FrmDiskPart.class
+# /home/moises/area-51/projects/installer/FrmDiskPart.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmLicense.pot
==============================================================================
--- branches/iVL/.lang/FrmLicense.pot (original)
+++ branches/iVL/.lang/FrmLicense.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FrmLicense.class
+# /home/moises/area-51/projects/installer/FrmLicense.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmPartScheme.pot
==============================================================================
--- branches/iVL/.lang/FrmPartScheme.pot (original)
+++ branches/iVL/.lang/FrmPartScheme.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FrmPartScheme.class
+# /home/moises/area-51/projects/installer/FrmPartScheme.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/FrmPartSel.pot
==============================================================================
--- branches/iVL/.lang/FrmPartSel.pot (original)
+++ branches/iVL/.lang/FrmPartSel.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FrmPartSel.class
+# /home/moises/area-51/projects/installer/FrmPartSel.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -14,19 +14,19 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: FrmPartSel.class:61
+#: FrmPartSel.class:120
msgid "Define where the operating system will be
installed\n<br>\nLinux is a modular operating system. This means that
it has the ability to keep system and user data separately.<br> A
recommended setup would included a / (root), a /home, and a swap
partitions.\n<br>\nPlease select which partitions you would like to use
for your install"
msgstr ""
-#: FrmPartSel.class:69
+#: FrmPartSel.class:128
msgid "<b>Partition</b>"
msgstr ""
-#: FrmPartSel.class:75
+#: FrmPartSel.class:134
msgid "<b>Mount Point</b>"
msgstr ""
-#: FrmPartSel.class:81
+#: FrmPartSel.class:140
msgid "<b>File System</b>"
msgstr ""
Modified: branches/iVL/.lang/FrmSelISO.pot
==============================================================================
--- branches/iVL/.lang/FrmSelISO.pot (original)
+++ branches/iVL/.lang/FrmSelISO.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/FrmSelISO.class
+# /home/moises/area-51/projects/installer/FrmSelISO.class
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlCore.pot
==============================================================================
--- branches/iVL/.lang/MdlCore.pot (original)
+++ branches/iVL/.lang/MdlCore.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/MdlCore.module
+# /home/moises/area-51/projects/installer/MdlCore.module
# 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 Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/MdlDiskPart.module
+# /home/moises/area-51/projects/installer/MdlDiskPart.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlObjSizer.pot
==============================================================================
--- branches/iVL/.lang/MdlObjSizer.pot (original)
+++ branches/iVL/.lang/MdlObjSizer.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/MdlObjSizer.module
+# /home/moises/area-51/projects/installer/MdlObjSizer.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 Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/MdlPartSel.module
+# /home/moises/area-51/projects/installer/MdlPartSel.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Modified: branches/iVL/.lang/MdlSetup.pot
==============================================================================
--- branches/iVL/.lang/MdlSetup.pot (original)
+++ branches/iVL/.lang/MdlSetup.pot Mon Jul 14 13:32:23 2008
@@ -1,4 +1,4 @@
-# /home/vluser/area-51/projects/new-inst/MdlSetup.module
+# /home/moises/area-51/projects/installer/MdlSetup.module
# Generated by Gambas compiler
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Added: branches/iVL/ClsPartSel.class
==============================================================================
--- (empty file)
+++ branches/iVL/ClsPartSel.class Mon Jul 14 13:32:23 2008
@@ -0,0 +1,16 @@
+' Gambas class file
+
+STATIC PUBLIC sRoot AS String
+STATIC PUBLIC fRoot AS String
+STATIC PUBLIC sHome AS String
+STATIC PUBLIC fhome AS String
+STATIC PUBLIC sUsr AS String
+STATIC PUBLIC fUsr AS String
+STATIC PUBLIC sOpt AS String
+STATIC PUBLIC fOpt AS String
+STATIC PUBLIC sVar AS String
+STATIC PUBLIC fVar AS String
+STATIC PUBLIC sTmp AS String
+STATIC PUBLIC fTmp AS String
+
+STATIC PUBLIC sSwap AS String
Modified: branches/iVL/FrmPartSel.class
==============================================================================
--- branches/iVL/FrmPartSel.class (original)
+++ branches/iVL/FrmPartSel.class Mon Jul 14 13:32:23 2008
@@ -52,3 +52,49 @@
END
+
+PUBLIC SUB Form_Hide()
+
+
+
+END
+
+PUBLIC SUB ANALYZE_PARTITION_SETUP()
+
+ IF NOT sRootAddr THEN
+ Message.Error("You must select at least one partition for \"/\"
This is there the system will be installed to")
+ STOP EVENT
+ ELSE IF NOT sRootFrmt THEN
+ Message.Error("You must select which file system type to use with
your \"/\" partition.")
+ STOP EVENT
+ ELSE
+ ClsPartSel.sRoot = sRootAddr
+ ClsPartSel.fRoot = sRootFrmt
+ END IF
+
+ IF sHomeAddr THEN
+ ClsPartSel.sHome = sHomeAddr
+ ClsPartSel.fhome = sHomeFrmt
+ END IF
+ IF sUsrAddr THEN
+ ClsPartSel.sUsr = sUsrAddr
+ ClsPartSel.fUsr = sUsrFrmt
+ END IF
+ IF sOptAddr THEN
+ ClsPartSel.sOpt = sOptAddr
+ ClsPartSel.fOpt = sOptFrmt
+ END IF
+ IF sVarAddr THEN
+ ClsPartSel.sVar = sVarAddr
+ ClsPartSel.fVar = sVarFrmt
+ END IF
+ IF sTmpAddr THEN
+ ClsPartSel.sVar = sTmpAddr
+ ClsPartSel.fTmp = sTrmFrmt
+ END IF
+
+
+
+END
+
+
Modified: branches/iVL/MdlPartSel.module
==============================================================================
--- branches/iVL/MdlPartSel.module (original)
+++ branches/iVL/MdlPartSel.module Mon Jul 14 13:32:23 2008
@@ -164,6 +164,7 @@
.Height = 27
.tag = "SwapLbl"
.Alignment = Align.Normal
+ ClsPartSel.sSwap = sPart
END WITH
' now create a combobox with the swap-only option
@@ -176,6 +177,7 @@
.tag = "swapSelection"
.ReadOnly = TRUE
.Add("Swap")
+
END WITH
@@ -226,10 +228,18 @@
FOR EACH sdropdwn IN oFsTypes
IF sdropdwn.tag = LAST.tag THEN
sdropdwn.Text = "XFS"
+ 'Balloon.Info("Select which filesystem to use with this
partition", sdropdwn)
+ Balloon("Select which filesystem to use with this partition", sdropdwn)
+
END IF
NEXT
END IF
+ 'send the value to the form public value
+ ME.SET_SELECTED_PARTITION(LAST.tag, LAST.text)
+
+
+
END
PUBLIC SUB fsTypes_click()
@@ -246,6 +256,50 @@
END IF
NEXT
END IF
+
+ PRINT "format " & LAST.tag & " as " & LAST.text
+
+ ME.SET_PARTITION_FORMAT(LAST.tag, LAST.text)
+
+
+END
+
+PUBLIC SUB SET_SELECTED_PARTITION(SPartition AS String, sMountPoint AS String)
+
+ SELECT CASE sMountPoint
+ CASE "/"
+ FrmPartSel.sRootAddr = SPartition
+ CASE "/home"
+ FrmPartSel.sHomeAddr = SPartition
+ CASE "/opt"
+ FrmPartSel.sOptAddr = SPartition
+ CASE "/usr"
+ FrmPartSel.sUsrAddr = SPartition
+ CASE "/var"
+ FrmPartSel.sVarAddr = SPartition
+ CASE "/tmp"
+ FrmPartSel.sTmpAddr = SPartition
+ END SELECT
+
+END
+
+PUBLIC SUB SET_PARTITION_FORMAT(sMountPoint AS String, sFormat AS String)
+
+ SELECT CASE sMountPoint
+ CASE "/"
+ FrmPartSel.sRootFrmt = sFormat
+ CASE "/home"
+ FrmPartSel.sHomeFrmt = sFormat
+ CASE "/opt"
+ FrmPartSel.sOptFrmt = sFormat
+ CASE "/usr"
+ FrmPartSel.sUsrFrmt = sFormat
+ CASE "/var"
+ FrmPartSel.sVarFrmt = sFormat
+ CASE "/tmp"
+ FrmPartSel.sTrmFrmt = sFormat
+ END SELECT
+
END
Modified: branches/iVL/MdlSetup.module
==============================================================================
--- branches/iVL/MdlSetup.module (original)
+++ branches/iVL/MdlSetup.module Mon Jul 14 13:32:23 2008
@@ -67,9 +67,265 @@
RETURN FALSE ' no reboot needed
END IF
+
+END
+
+PUBLIC FUNCTION FORMAT_SELECTED_PARTITIONS() AS Integer
+
+ 'DIM hproc AS Process
+ DIM sDump AS String
+
+
+
+
+ SHELL "mkfs." & LCase(ClsPartSel.fRoot) & " || echo \'ERROR\'" TO sDump
+ ' IF hproc.State = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.state = Process.Stopped
+ ' ' do the error checking
+ ' END IF
+ GOTO CHECK_OUTPUT
+
+
+ IF ClsPartSel.sHome AND ClsPartSel.fhome <> "Do not format" THEN
+ sDump = ""
+ SHELL "mkfs." & LCase(ClsPartSel.fhome) & " || echo \'ERROR\'" TO sDump
+ ' IF hproc.State = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.state = Process.Stopped
+ ' END IF
+ GOTO CHECK_OUTPUT
+ END IF
+
+
+
+ IF ClsPartSel.sOpt AND ClsPartSel.fOpt <> "Do not format" THEN
+ sDump = ""
+ SHELL "mkfs." & LCase(ClsPartSel.fOpt) & " || echo \'ERROR\'" TO sDump
+ ' IF hproc.State = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.state = Process.Stopped
+ ' END IF
+
+ GOTO CHECK_OUTPUT
+ END IF
+
+ IF ClsPartSel.sUsr AND ClsPartSel.fUsr <> "Do not format" THEN
+ sDump = ""
+ SHELL "mkfs." & LCase(ClsPartSel.fUsr) & " || echo \'ERROR\'" TO sDump
+ ' IF hproc.State = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.State = Process.Stopped
+ ' END IF
+ GOTO CHECK_OUTPUT
+ END IF
+
+ IF ClsPartSel.sVar AND ClsPartSel.fVar <> "Do not format" THEN
+ sDump = ""
+ SHELL "mkfs." & LCase(ClsPartSel.fVar) & " || echo \'ERROR\'" TO sDump
+ ' IF hproc.State = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.State = Process.Stopped
+ ' END IF
+ GOTO CHECK_OUTPUT
+ END IF
+
+ IF ClsPartSel.sTmp AND ClsPartSel.fTmp <> "Do not format" THEN
+ sDump = ""
+ SHELL "mkfs." & LCase(ClsPartSel.fTmp) & " || echo \'FAILED\'"
TO sDump
+ ' IF hproc.state = Process.Running THEN
+ ' REPEAT
+ ' WAIT
+ ' UNTIL
+ ' hproc.state = Process.Stopped
+ ' END IF
+ GOTO CHECK_OUTPUT
+ END IF
+
+
+
+CHECK_OUTPUT:
+ IF InStr(sDump, "ERROR") = TRUE THEN
+ RETURN 1 ' not good... stop right there
+ ELSE
+ RETURN 0
+ END IF
+
+END
+
+
+PUBLIC SUB MOUNT_DEFINED_PARTITIONS()
+
+ ' this is where we need to set the mount target
+ ClsGlobal.sTargetMnt = "/mnt/target"
+ IF Exist(ClsGlobal.sTargetMnt)FALSE THEN
+ TRY MKDIR ClsGlobal.sTargetMnt
+ END IF
+
+ SHELL "umount " & ClsGlobal.sTargetMnt WAIT 'clear the mount point
+
+ SHELL "mount " & ClsPartSel.sRoot & Space(1) &
ClsGlobal.sTargetMnt & Space(1) & " -t " & ClsPartSel.fRoot WAIT 'moun
the root partition first
+ IF ClsPartSel.sHome THEN
+ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "home" WAIT
+ SHELL "mount " & ClsPartSel.sHome & Space(1) &
ClsGlobal.sTargetMnt &/ "home -t " & ClsPartSel.fhome WAIT 'mount the
home partition if defined
+
+ END IF
+ IF ClsPartSel.sUsr THEN
+ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "usr" WAIT
+ SHELL "mount " & ClsPartSel.sUsr & Space(1) &
ClsGlobal.sTargetMnt &/ "usr -t" & ClsPartSel.fUsr WAIT ' mount the
user partition
+ END IF
+ IF ClsPartSel.sOpt THEN
+ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "opt" WAIT
+ SHELL "mount " & ClsPartSel.sOpt & Space(1) &
ClsGlobal.sTargetMnt &/ "opt -t " & ClsPartSel.fOpt WAIT 'mount the opt partitiong
+ END IF
+ IF ClsPartSel.sVar THEN
+ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "var" WAIT
+ SHELL "mount " & ClsPartSel.sVar & Space(1) &
ClsGlobal.sTargetMnt &/ "var -t " & ClsPartSel.fVar WAIT
+ END IF
+ IF ClsPartSel.sTmp THEN
+ SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "tmp" WAIT
+ SHELL "mount " & ClsPartSel.sTmp & Space(1) &
ClsGlobal.sTargetMnt &/ "tmp -t " & ClsPartSel.fTmp WAIT
+ END IF
+
+ ' see if there is a swap partition and use it
+ IF ClsPartSel.sSwap THEN
+ SHELL "swapon -a " WAIT
+ END IF
+
+ 'WRITE THE NEW FSTAB NOW, RIGHT BEFORE INSTALLING PACKAGES.
+
+ ME.WRITE_NEW_FSTAB()
+
+
+
+END
+
+
+
+
+
+
+PUBLIC FUNCTION WRITE_NEW_FSTAB()
+
+ DIM sEntry AS String
+ DIM sPartition AS String
+ DIM sMountPoint AS String
+ DIM sMntOpts AS String
+
+ DIM sFstab AS String
+
+ sFstab = "# /etc/fstab: static file system information.\n" &
+ "#\n" &
+"#The following is an example.Please see fstab(5) for further
details.\n" &
+"#Please refer to mount(1) for a complete description OF mount
options.\n" &
+"#\n" &
+"#Format:\n" &
+"# < file system > < mount point > < type > < options > < dump > <
pass >\n" &
+"#\n" &
+"#dump(8)uses the < dump > field to determine which file systems need
\n" &
+"# to be dumped.fsck(8)uses the < pass > column TO determine which
file \n" &
+"#systems need TO be checked - - the root file system should have a 1
in \n" &
+"#this field, other file systems a 2, AND any file systems that should
\n" &
+"#not be checked(such AS MS - initrd / mnt OR NFS file systems)a
0.\n\n\n" &
+"#The Linux partitions\n"
+
+sFstab = sFstab & gb.NewLine &
+ClsPartSel.sRoot & " / " & LCase(ClsPartSel.fRoot) & " " &
ME.fS_oPTIONS(LCase(ClsPartSel.fRoot)) & " 0 1" & gb.NewLine
+IF ClsPartSel.sHome THEN
+ sFstab = sFstab & gb.NewLine & ClsPartSel.sHome & " /home " &
LCase(ClsPartSel.fhome) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fhome))
& " 0 2"
+END IF
+IF ClsPartSel.sUsr THEN
+ sFstab = sFstab & gb.NewLine & ClsPartSel.sUsr & " /usr " &
LCase(ClsPartSel.fUsr) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fUsr))
& " 0 2 "
+END IF
+IF ClsPartSel.sOpt THEN
+ sFstab = sFstab & gb.NewLine & ClsPartSel.sopt & " /opt " &
LCase(ClsPartSel.fOpt) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fOpt))
& " 0 2 "
+END IF
+IF ClsPartSel.sVar THEN
+ sFstab = sFstab & gb.NewLine & ClsPartSel.sVar & " /var " &
LCase(ClsPartSel.fVar) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fVar))
& " 0 2 "
+END IF
+IF ClsPartSel.sTmp THEN
+ sFstab = sFstab & gb.NewLine & ClsPartSel.sTmp & " /tmp " &
LCase(ClsPartSel.fTmp) & " " & ME.fS_oPTIONS(LCase(ClsPartSel.fTmp))
& " 0 2 "
+END IF
+
+sFstab = sFstab & "\n\n" &
+"# Shared Windows/Linux partition"
+"#/dev/hda1 /mnt/dos msdos umask=0 0 0 \n" &
+"#/dev/hda1 /mnt/win vfat
fmask=111,dmask=0,quiet,shortname=mixed,user 0 0 \n" &
+"#/dev/hda1 /mnt/win ntfs umask=0 0 0\n" &
+' Add any windows partitions to the fstab file
+' fix me here please
+
+"# Floppy disks \n" &
+"# The 'noauto' option indicates that the file system should not be
mounted \n" &
+"# with 'mount -a' 'user' indicates that normal users are allowed to
mount \n" &
+"# the file system. \n" &
+"/dev/fd0 /mnt/floppy auto defaults,noauto,user 0 0 \n" &
+"#/dev/fd1 /mnt/floppy auto defaults,noauto,user 0 0 \n\n" &
+"# If you have a ls-120 floppy drive, it could be on /dev/hda b c d
etc.\n" &
+"#/dev/hdd /mnt/ls120 auto defaults,noauto,user 0 0 \n\n" &
+"# CDROM, CDWRITER, DVD \n" &
+"/dev/cdrom /mnt/cdrom iso9660 defaults,noauto,ro,user 0 0 \n" &
+"#/dev/cdwriter /mnt/cdwriter iso9660 defaults,noauto,rw,user 0 0
\n" &
+"#/dev/dvd /mnt/dvd auto defaults,noauto,ro,user 0 0\n\n" &
+"# NFS file systems:\n" &
+"#linux01.gwdg.de:/suse/6.3/i386.de /mnt/nfs nfs defaults 0 0\n\n" &
+"# proc file system:\n" &
+"proc /proc proc defaults 0 0\n\n" &
+"# Unix98 devpts filesystem: \n" &
+"none /dev/pts devpts gid=5,mode=666 0 0\n\n" &
+"# Shared memory filesystem: \n" &
+"tmpfs /dev/shm tmpfs defaults 0 0 \n\n" &
+"# Basic USB filesystem\n" &
+"sysfs /sys sysfs defaults 0 0\n" &
+"usbfs /proc/bus/usb usbfs rw,devmode=0666 0 0\n\n" &
+"# example of a VFAT USB pendrive\n" &
+"#/dev/sda1 /mnt/pendrive vfat
fmask=111,dmask=0,noauto,user,quiet,shortname=mixed 0 0\n\n" &
+
+"# Swap partitions\n" &
+"# The 'sw' option means auto activating with 'swapon -a'.\n"
+IF ClsPartSel.sSwap THEN
+ sFstab = sFstab & gb.NewLine &
+ ClsPartSel.sSwap & Space(5) & "none" & Space(5) & "swap" & Space(5)
& "sw" & Space(5) & "0" & Space(5) & "0"
+END IF
+' Wheewww!... that's the whole fstab there... Please fix the win partitions
+
+
+
+
+
+
+
+
+
+
+END
+PUBLIC FUNCTION fS_oPTIONS(sType AS String) AS String
+ SELECT CASE LCase(sFrmt)
+ CASE "reiserfs"
+ sMntOpts = "noatime"
+ CASE "vfat"
+ sMntOpts = "fmask=111,dmask=0,gid=users,shortname=mixed,quiet,user"
+ CASE "ntfs"
+ sMntOpts = "umask=0,gid=users,user"
+ CASE "ext2", "ext3", ELSE
+ sMntOpts = "defaults"
+ END SELECT
+
+ RETURN sMntOpts
END
+
|