From 83410bc120b1f214401517f00da86c53e9f3d1b2 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 24 Jun 2013 11:30:31 +0300 Subject: [PATCH] VfatDiskMount: do not initialize uuid Do not try to be too smart and initialize UUID to a time-stamp. This UUID is later on used form mounting in /etc/fstab (UUID=...), and of course this fails for VFAT because VfatDiskMount provides a fake UUID. Instead, make VfatDiskMount provide no UUID at all. Signed-off-by: Artem Bityutskiy --- mic/utils/fs_related.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py index 56b9a4f..67a7dff 100644 --- a/mic/utils/fs_related.py +++ b/mic/utils/fs_related.py @@ -560,7 +560,7 @@ class VfatDiskMount(DiskMount): DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir) self.blocksize = blocksize self.fslabel = fslabel.replace("/", "") - self.uuid = "%08X" % int(time.time()) + self.uuid = None self.skipformat = skipformat self.fsopts = fsopts self.fsckcmd = find_binary_path("fsck." + self.fstype) @@ -571,7 +571,7 @@ class VfatDiskMount(DiskMount): return msger.verbose("Formating %s filesystem on %s" % (self.fstype, self.disk.device)) - rc = runner.show([self.mkfscmd, "-n", self.fslabel, "-i", self.uuid, self.disk.device]) + rc = runner.show([self.mkfscmd, "-n", self.fslabel, self.disk.device]) if rc != 0: raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device)) -- 2.7.4