FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian ISP

 
 
LinkBack Thread Tools
 
Old 12-10-2010, 08:23 PM
David Lehman
 
Default Set up disk images earlier so kickstart device filtering works on them.

---
anaconda | 1 +
pyanaconda/storage/__init__.py | 4 ++++
pyanaconda/storage/devicetree.py | 12 ++++++++----
3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/anaconda b/anaconda
index 2116571..83f47d2 100755
--- a/anaconda
+++ b/anaconda
@@ -626,6 +626,7 @@ if __name__ == "__main__":
anaconda.storage.config.diskImages[name] = path
image_count += 1
flags.imageInstall = True
+ anaconda.storage.setupDiskImages()

if opts.vnc:
flags.usevnc = 1
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index e815c20..b6146a6 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -966,6 +966,10 @@ class Storage(object):
log.error("failed to add new passphrase to existing "
"device %s" % device.path)

+ def setupDiskImages(self):
+ self.devicetree.setDiskImages(self.config.diskImag es)
+ self.devicetree.setupDiskImages()
+
def sanityCheck(self):
""" Run a series of tests to verify the storage configuration.

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index a3ddde2..d36a870 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -172,10 +172,7 @@ class DeviceTree(object):
self.iscsi = iscsi
self.dasd = dasd

- # disk image files are automatically exclusive
- self.diskImages = getattr(conf, "diskImages", {})
- if self.diskImages:
- self.exclusiveDisks = self.diskImages.keys()
+ self.setDiskImages(getattr(conf, "diskImages", {}))

# protected device specs as provided by the user
self.protectedDevSpecs = getattr(conf, "protectedDevSpecs", [])
@@ -199,6 +196,12 @@ class DeviceTree(object):

self._cleanup = False

+ def setDiskImages(self, images):
+ """ Set the disk images and reflect them in exclusiveDisks. """
+ self.diskImages = images
+ # disk image files are automatically exclusive
+ self.exclusiveDisks = self.diskImages.keys()
+
def addIgnoredDisk(self, disk):
self._ignoredDisks.append(disk)
devicelibs.lvm.lvm_cc_addFilterRejectRegexp(disk)
@@ -1574,6 +1577,7 @@ class DeviceTree(object):
return ret

def setupDiskImages(self):
+ """ Set up devices to represent the disk image files. """
for (name, path) in self.diskImages.items():
log.info("setting up disk image file '%s' as '%s'" % (path, name))
try:
--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org