[PATCH 3/3] Leave already-active devices up after destroying formatting. (#1064898)

David Lehman dlehman at redhat.com
Thu Feb 20 18:07:04 UTC 2014


---
 blivet/deviceaction.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index 7f9c082..e9d58cb 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -31,6 +31,7 @@ from formats import getFormat
 from errors import *
 from parted import partitionFlag, PARTITION_LBA
 from i18n import _, N_
+from flags import flags
 
 import logging
 log = logging.getLogger("blivet")
@@ -530,10 +531,12 @@ class ActionDestroyFormat(DeviceAction):
 
     def execute(self):
         """ wipe the filesystem signature from the device """
+        status = self.device.status
         self.device.setup(orig=True)
         self.format.destroy()
         udev_settle()
-        self.device.teardown()
+        if flags.installer_mode or not status:
+            self.device.teardown()
 
     def cancel(self):
         self.device.format = self.origFormat
-- 
1.8.5.3



More information about the anaconda-patches mailing list