X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=grml2usb;h=e608ac145de4253a71b80b40e220652aa937aa1b;hb=6868425f2674bc1443cb75bbb78991908d58646c;hp=9d5c2ef6a9293670c8e13d34df313a4029219c2e;hpb=1fe44d6eb925578552821dd1c281ecb8e694dfe3;p=grml2usb.git diff --git a/grml2usb b/grml2usb index 9d5c2ef..e608ac1 100755 --- a/grml2usb +++ b/grml2usb @@ -645,6 +645,10 @@ def install_mbr(mbrtemplate, device, partition, ismirbsdmbr=True): raise Exception("error executing dd (third run)") del tmpf + # make sure we sync filesystems before returning + proc = subprocess.Popen(["sync"]) + proc.wait() + def is_writeable(device): """Check if the device is writeable for the current user @@ -1732,6 +1736,9 @@ def check_options(opts): if opts.grubmbr and not opts.grub: raise CriticalException("--grub-mbr requires --grub option.") + if opts.copyonly and opts.grub: + raise CriticalException("Cannot use --copy-only and --grub at the same time.") + def check_programs(): """check if all needed programs are installed"""