diff options
author | Peter Jones <pjones@redhat.com> | 2005-11-17 04:45:14 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2005-11-17 04:45:14 +0000 |
commit | 0e6854bf766ca9dec172f40d82a1df70c3743735 (patch) | |
tree | 9709ce2e2dcc905e2370a3e9ad45e1f934ec12dc /dmraid.py | |
parent | 6e5dc2d47b4a1e28482c4c9d215c8ca04312c862 (diff) | |
download | anaconda-0e6854bf766ca9dec172f40d82a1df70c3743735.tar.gz anaconda-0e6854bf766ca9dec172f40d82a1df70c3743735.tar.xz anaconda-0e6854bf766ca9dec172f40d82a1df70c3743735.zip |
- use the dmraid flag
Diffstat (limited to 'dmraid.py')
-rw-r--r-- | dmraid.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -22,6 +22,7 @@ import sys import block import parted import raid +from flags import flags import logging log = logging.getLogger("anaconda.dmraid") @@ -124,12 +125,17 @@ def scanForRaid(drives, degradedOk=False): yield info def startRaidDev(rs): + if flags.dmraid == 0: + return rs.prefix = '/tmp/mapper/' log.debug("starting raid %s with mknod=True" % (rs,)) rs.activate(mknod=True) def startAllRaid(driveList): """Do a raid start on raid devices and return a list like scanForRaid.""" + + if flags.dmraid == 0: + return log.debug("starting all dmraids on drives %s" % (driveList,)) dmList = scanForRaid(driveList) for dmset in dmList: @@ -138,6 +144,8 @@ def startAllRaid(driveList): yield dmset def stopRaidSet(rs): + if flags.dmraid == 0: + return log.debug("stopping raid %s" % (rs,)) if isys.cachedDrives.has_key("mapper/" + rs.name): del isys.cachedDrives["mapper/" + rs.name] @@ -151,6 +159,8 @@ def stopRaidSet(rs): def stopAllRaid(dmList): """Do a raid stop on each of the raid device tuples given.""" + if flags.dmraid == 0: + return import traceback as _traceback stack = _traceback.format_stack() for frame in stack: |