summaryrefslogtreecommitdiffstats
path: root/partitioning.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-07-06 19:06:09 +0000
committerMike Fulbright <msf@redhat.com>2001-07-06 19:06:09 +0000
commit741c79c60258c937157fbd5a2a862b7e6e6c8905 (patch)
tree07bf2507b6ca49651d2d98e0d8d9bc1ed49b6e75 /partitioning.py
parent39927c9a5c79639fb2b78e80930dc6c8ce12edfb (diff)
downloadanaconda-741c79c60258c937157fbd5a2a862b7e6e6c8905.tar.gz
anaconda-741c79c60258c937157fbd5a2a862b7e6e6c8905.tar.xz
anaconda-741c79c60258c937157fbd5a2a862b7e6e6c8905.zip
turn on formatting for preexisting partitions we want to, and also hook in some online help in GUI mode
Diffstat (limited to 'partitioning.py')
-rw-r--r--partitioning.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/partitioning.py b/partitioning.py
index edbfa65b0..888a5505a 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -334,6 +334,29 @@ def isMountPointInUse(reqpartitions, newrequest):
"choose a different mount point." %(mntpt))
return None
+# figure out whether we should format by default
+def isFormatOnByDefault(request):
+ deflist = ['/home', '/usr/local/', '/opt', '/var/www']
+
+ # check first to see if its a Linux filesystem or not
+ if not request.fstype:
+ return 0
+
+ if not request.fstype.isLinuxNativeFS():
+ return 0
+
+ if request.fstype.isMountable():
+ if request.mountpoint and request.mountpoint in deflist:
+ return 0
+ else:
+ return 1
+ else:
+ if request.fstype.getName() == "swap":
+ return 1
+
+ # be safe for anything else and default to off
+ return 0
+
def doMountPointLinuxFSChecks(newrequest):
mustbeonroot = ['/bin','/dev','/sbin','/etc','/lib','/root','/mnt']
mustbeonlinuxfs = ['/', '/boot', '/var', '/tmp', '/usr', '/home']