summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-04-16 17:04:51 +0200
committerHans de Goede <hdegoede@redhat.com>2010-04-19 10:04:52 +0200
commitae6bda0e34a88b1063df8c62840c58a974f78cf8 (patch)
tree31b6479a014f36d841ec7b0274b1350f61c8319b
parenta74f362fd338f362ead16301debd21cae7b5abfb (diff)
downloadanaconda-ae6bda0e34a88b1063df8c62840c58a974f78cf8.tar.gz
anaconda-ae6bda0e34a88b1063df8c62840c58a974f78cf8.tar.xz
anaconda-ae6bda0e34a88b1063df8c62840c58a974f78cf8.zip
Prevent low-level formatting of DASDs in rescue mode (#582638)
Note I'm not completely happy with how this looks, I wonder if it wouldn't be better to make questionInitializeDASD simply return True or False and always allow installs to continue with unformatted DASD's if the user chooses so.
-rw-r--r--rescue.py4
-rw-r--r--storage/dasd.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/rescue.py b/rescue.py
index 269b9b32f..8f6c95670 100644
--- a/rescue.py
+++ b/rescue.py
@@ -118,6 +118,10 @@ class RescueInterface(InstallInterfaceBase):
# Never reinit VG's in rescue mode!
return False
+ def questionInitializeDASD(self, c, devs):
+ # Special return value to let dasd.py know we're rescue mode
+ return "rescue"
+
def shutdown (self):
pass
diff --git a/storage/dasd.py b/storage/dasd.py
index 304099db1..a8ee27adf 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -128,6 +128,10 @@ class DASD:
if rc == 1:
log.info(" not running dasdfmt, exiting installer")
sys.exit(0)
+ # Check for special rescue mode return
+ elif rc == "rescue":
+ log.info(" rescue mode: not running dasdfmt")
+ return
argv = ["-y", "-P", "-d", "cdl", "-b", "4096"]