summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-03-17 22:21:28 +0100
committerHans de Goede <hdegoede@redhat.com>2009-03-18 09:56:01 +0100
commit904d5c912092436d17f8c6c19dc47882241f6aef (patch)
treee1c634d23a89cb7ba5c80559178438494418bdad
parenta3d472c9bc45f8eae4924e7adc89aa90eae01922 (diff)
downloadanaconda-904d5c912092436d17f8c6c19dc47882241f6aef.tar.gz
anaconda-904d5c912092436d17f8c6c19dc47882241f6aef.tar.xz
anaconda-904d5c912092436d17f8c6c19dc47882241f6aef.zip
Set format UUID after creating a format
This fixes us having /dev/foo instead of UUID= in fstab for anaconda created filesystems.
-rw-r--r--storage/deviceaction.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/deviceaction.py b/storage/deviceaction.py
index f9a73229d..3f7ce916d 100644
--- a/storage/deviceaction.py
+++ b/storage/deviceaction.py
@@ -24,7 +24,7 @@
import copy
from parted import PARTITION_BOOT
-from udev import udev_settle
+from udev import *
from devices import StorageDevice, PartitionDevice
from formats import getFormat
@@ -278,6 +278,11 @@ class ActionCreateFormat(DeviceAction):
self.device.format.create(intf=intf,
device=self.device.path,
options=self.device.formatArgs)
+ # Get the UUID now that the format is created
+ udev_settle()
+ self.device.updateSysfsPath()
+ info = udev_get_block_device("/sys%s" % self.device.sysfsPath)
+ self.device.format.uuid = udev_device_get_uuid(info)
def cancel(self):
self.device.format = self.origFormat