diff options
author | David Lehman <dlehman@redhat.com> | 2009-03-27 15:27:39 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-03-30 21:22:44 -0500 |
commit | 0d7d37c7918714d78e8b4b11b37bf98e82ec4195 (patch) | |
tree | 33b015f5c6494aa76b24e89b915db0d417e644c5 | |
parent | 06548dddf49624366a970538944af0a3dcc5a9be (diff) | |
download | anaconda-0d7d37c7918714d78e8b4b11b37bf98e82ec4195.tar.gz anaconda-0d7d37c7918714d78e8b4b11b37bf98e82ec4195.tar.xz anaconda-0d7d37c7918714d78e8b4b11b37bf98e82ec4195.zip |
Don't write out md member devices to a config file for assemble.
This was either to work around a bug in mdadm or my bad usage, but
either way it is no longer necessary.
-rw-r--r-- | storage/devicelibs/mdraid.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py index dec5f2dc3..4aec86f7d 100644 --- a/storage/devicelibs/mdraid.py +++ b/storage/devicelibs/mdraid.py @@ -157,36 +157,16 @@ def mdactivate(device, members=[], super_minor=None, uuid=None): else: identifier = "" - filename = None - if members: - from tempfile import mkstemp - (fd, filename) = mkstemp(prefix="%s_devices." % device, - dir="/tmp", - text=True) - os.write(fd, "DEVICE %s\n" % " ".join(members)) - config_arg = "--config=%s" % filename - os.close(fd) - del mkstemp - else: - config_arg = "" - rc = iutil.execWithRedirect("mdadm", ["--assemble", - config_arg, device, identifier, "--auto=md", - "--update=super-minor"], + "--update=super-minor"] + members, stderr = "/dev/tty5", stdout = "/dev/tty5", searchPath=1) - if filename and os.access(filename, os.R_OK): - try: - os.unlink(filename) - except OSError, e: - log.debug("unlink of %s failed: %s" % (filename, e)) - if rc: raise MDRaidError("mdactivate failed for %s" % device) |