summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--harddrive.py9
-rw-r--r--installmethod.py22
-rw-r--r--todo.py2
-rw-r--r--urlinstall.py11
4 files changed, 31 insertions, 13 deletions
diff --git a/harddrive.py b/harddrive.py
index 3cb6d2647..bd42722e4 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -1,6 +1,7 @@
# Install method for disk image installs (CD & NFS)
from comps import ComponentSet, HeaderList
+from installmethod import InstallMethod
import os
import isys
import rpm
@@ -10,7 +11,7 @@ import todo
FILENAME = 1000000
-class InstallMethod:
+class HardDriveInstallMethod(InstallMethod):
def mountMedia(self):
if (self.isMounted):
@@ -66,16 +67,14 @@ class InstallMethod:
self.umountMedia()
return HeaderList(hl)
- def targetFstab(self, fstab):
+ def systemMounted(self, fstab, mntPoint):
self.mountMedia()
def filesDone(self):
self.umountMedia()
- def unlinkFilename(self, fullName):
- pass
-
def __init__(self, device, type, path):
+ InstallMethod.__init__(self)
self.device = device
self.path = path
self.fstype = type
diff --git a/installmethod.py b/installmethod.py
new file mode 100644
index 000000000..2a832ab7b
--- /dev/null
+++ b/installmethod.py
@@ -0,0 +1,22 @@
+class InstallMethod:
+
+ def readComps(self, hdlist):
+ pass
+
+ def getFilename(self, h):
+ pass
+
+ def readHeaders(self):
+ pass
+
+ def systemMounted(self, fstab, mntPoint):
+ pass
+
+ def filesDone(self):
+ pass
+
+ def unlinkFilename(self, fullName):
+ pass
+
+ def __init__(self):
+ pass
diff --git a/todo.py b/todo.py
index 899a2cea2..306ca1b1a 100644
--- a/todo.py
+++ b/todo.py
@@ -1136,7 +1136,7 @@ class ToDo:
# flag this so we only do it once.
self.dbpath = None
- self.method.targetFstab (self.fstab)
+ self.method.systemMounted (self.fstab, self.instPath)
if not self.installSystem:
return
diff --git a/urlinstall.py b/urlinstall.py
index af5601e42..46479c6d7 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -1,6 +1,7 @@
# Install method for disk image installs (CD & NFS)
from comps import ComponentSet, HeaderList
+from installmethod import InstallMethod
import os
import rpm
import time
@@ -18,7 +19,7 @@ import todo
FILENAME = 1000000
-class InstallMethod:
+class UrlInstallMethod(InstallMethod):
def readComps(self, hdlist):
return ComponentSet(self.baseUrl + '/RedHat/base/comps',
@@ -82,13 +83,9 @@ class InstallMethod:
return HeaderList(hl)
- def targetFstab(self, fstab):
- pass
-
- def filesDone(self):
- pass
-
def __init__(self, url):
+ InstallMethod.__init__(self)
+
i = string.index(url, '://') + 2
self.baseUrl = url[0:i]
rem = url[i:]