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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-11-2009, 09:28 AM
Radek Vykydal
 
Default (take II) Set boot flag for /boot on mdraid 1 array too (#533533).

Updated with suggestions from hansg and clumens. Way less nasty now.

---
storage/__init__.py | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 70c3227..310d4b4 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -281,13 +281,19 @@ class Storage(object):
# now set the boot partition's flag
try:
boot = self.anaconda.platform.bootDevice()
+ if boot.type == "mdarray":
+ bootDevs = boot.parents
+ else:
+ bootDevs = [boot]
except DeviceError:
- boot = None
+ bootDevs = []
else:
- if hasattr(boot, "bootable"):
- boot.bootable = True
- boot.disk.setup()
- boot.disk.format.commitToDisk()
+ for dev in bootDevs:
+ if hasattr(dev, "bootable"):
+ log.info("setting boot flag on %s" % dev.name)
+ dev.bootable = True
+ dev.disk.setup()
+ dev.disk.format.commitToDisk()

@property
def nextID(self):
--
1.6.0.6

_______________________________________________
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:40 PM.

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