Skip to content

Instantly share code, notes, and snippets.

@EgonSpengler
Created September 30, 2016 17:38
Show Gist options
  • Save EgonSpengler/204a86d1c8db21cb0dc4e0591a5ad29f to your computer and use it in GitHub Desktop.
Save EgonSpengler/204a86d1c8db21cb0dc4e0591a5ad29f to your computer and use it in GitHub Desktop.
--- /bin/anaconda-cleanup 2016-06-13 19:20:58.000000000 -0400
+++ /bin/anaconda-cleanup 2016-09-30 13:28:29.509973691 -0400
@@ -77,14 +77,15 @@
and live_install and not "live" in device:
os.system("umount %s" % mountpoint)
-os.system("udevadm control --env=ANACONDA=1")
os.system("udevadm trigger --subsystem-match block")
os.system("udevadm settle")
devicetree = DeviceTree(conf=storage_config)
devicetree.populate(cleanupOnly=True)
-devicetree.teardownAll()
for name in devicetree.diskImages.keys():
device = devicetree.getDeviceByName(name)
+ for leaf in devicetree.leaves:
+ if leaf.depends_on(device):
+ leaf.teardown(recursive=True)
device.deactivate(recursive=True)
os.system("udevadm control --env=ANACONDA=0")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment