summaryrefslogtreecommitdiffstats
path: root/livecd.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-12-21 13:10:13 -0500
committerChris Lumens <clumens@redhat.com>2010-02-04 15:07:53 -0500
commit7ea42d120f84005dce27a9d3ca98732c929999ab (patch)
tree1690eebaaf94f14182ee9f66c179ee6d1de13da1 /livecd.py
parent7959758242dfbed72be1376daeecb2132a1b5f23 (diff)
downloadanaconda-7ea42d120f84005dce27a9d3ca98732c929999ab.tar.gz
anaconda-7ea42d120f84005dce27a9d3ca98732c929999ab.tar.xz
anaconda-7ea42d120f84005dce27a9d3ca98732c929999ab.zip
Move storage into the Anaconda class.
Diffstat (limited to 'livecd.py')
-rw-r--r--livecd.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/livecd.py b/livecd.py
index ca78199de..9058a494e 100644
--- a/livecd.py
+++ b/livecd.py
@@ -162,7 +162,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
def postAction(self, anaconda):
self._unmountNonFstabDirs(anaconda)
try:
- anaconda.id.storage.umountFilesystems(swapoff = False)
+ anaconda.storage.umountFilesystems(swapoff = False)
os.rmdir(anaconda.rootPath)
except Exception, e:
log.error("Unable to unmount filesystems: %s" % e)
@@ -171,7 +171,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
if anaconda.dir == DISPATCH_BACK:
self._unmountNonFstabDirs(anaconda)
return
- anaconda.id.storage.umountFilesystems(swapoff = False)
+ anaconda.storage.umountFilesystems(swapoff = False)
def doInstall(self, anaconda):
log.info("Preparing to install packages")
@@ -183,7 +183,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
osimg = self._getLiveBlockDevice() # the real image
osfd = os.open(osimg, os.O_RDONLY)
- rootDevice = anaconda.id.storage.rootDevice
+ rootDevice = anaconda.storage.rootDevice
rootDevice.setup()
rootfd = os.open(rootDevice.path, os.O_WRONLY)
@@ -233,10 +233,10 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
self._resizeRootfs(anaconda, wait)
# remount filesystems
- anaconda.id.storage.mountFilesystems()
+ anaconda.storage.mountFilesystems()
# restore the label of / to what we think it is
- rootDevice = anaconda.id.storage.rootDevice
+ rootDevice = anaconda.storage.rootDevice
rootDevice.setup()
# ensure we have a random UUID on the rootfs
# FIXME: this should be abstracted per filesystem type
@@ -262,8 +262,8 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
# now create a tree so that we know what's mounted under where
fsdict = {"/": []}
- for mount in sorted(anaconda.id.storage.mountpoints.keys()):
- entry = anaconda.id.storage.mountpoints[mount]
+ for mount in sorted(anaconda.storage.mountpoints.keys()):
+ entry = anaconda.storage.mountpoints[mount]
tocopy = entry.format.mountpoint
if tocopy.startswith("/mnt") or tocopy == "swap":
continue
@@ -282,7 +282,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
continue
copied.append(tocopy)
copied.extend(map(lambda x: x.format.mountpoint, fsdict[tocopy]))
- entry = anaconda.id.storage.mountpoints[tocopy]
+ entry = anaconda.storage.mountpoints[tocopy]
# FIXME: all calls to wait.refresh() are kind of a hack... we
# should do better about not doing blocking things in the
@@ -326,7 +326,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
def _resizeRootfs(self, anaconda, win = None):
log.info("going to do resize")
- rootDevice = anaconda.id.storage.rootDevice
+ rootDevice = anaconda.storage.rootDevice
# FIXME: we'd like to have progress here to give an idea of
# how long it will take. or at least, to give an indefinite
@@ -367,9 +367,9 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
packages.rpmSetupGraphicalSystem(anaconda)
# now write out the "real" fstab and mtab
- anaconda.id.storage.write(anaconda.rootPath)
+ anaconda.storage.write(anaconda.rootPath)
f = open(anaconda.rootPath + "/etc/mtab", "w+")
- f.write(anaconda.id.storage.mtab)
+ f.write(anaconda.storage.mtab)
f.close()
# copy over the modprobe.conf
@@ -398,7 +398,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
# FIXME: really, this should be in the general sanity checking, but
# trying to weave that in is a little tricky at present.
ossize = self._getLiveSizeMB()
- slash = anaconda.id.storage.rootDevice
+ slash = anaconda.storage.rootDevice
if slash.size < ossize:
rc = anaconda.intf.messageWindow(_("Error"),
_("The root filesystem you created is "