flush data to disk after mkfsimage (#1052175)
Make sure the data is written before we do anything else with the disk image. This shouldn't be needed, umount should take care of it, but it also can't hurt. Resolves: rhbz#1052175
This commit is contained in:
parent
1562dbe6ef
commit
d65ca8d789
@ -318,6 +318,9 @@ def mkfsimage(fstype, rootdir, outfile, size=None, mkfsargs=[], mountargs="", gr
|
|||||||
copytree(rootdir, mnt, preserve)
|
copytree(rootdir, mnt, preserve)
|
||||||
do_grafts(graft, mnt, preserve)
|
do_grafts(graft, mnt, preserve)
|
||||||
|
|
||||||
|
# Make absolutely sure that the data has been written
|
||||||
|
runcmd(["sync"])
|
||||||
|
|
||||||
# convenience functions with useful defaults
|
# convenience functions with useful defaults
|
||||||
def mkdosimg(rootdir, outfile, size=None, label="", mountargs="shortname=winnt,umask=0077", graft={}):
|
def mkdosimg(rootdir, outfile, size=None, label="", mountargs="shortname=winnt,umask=0077", graft={}):
|
||||||
mkfsimage("msdos", rootdir, outfile, size, mountargs=mountargs,
|
mkfsimage("msdos", rootdir, outfile, size, mountargs=mountargs,
|
||||||
|
Loading…
Reference in New Issue
Block a user