From: Lukas Prokop Date: Fri, 14 Feb 2014 11:28:29 +0000 (+0100) Subject: Ask user whether he really wants to use non-grml folder X-Git-Tag: v0.14.4~8 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=4be3d88c2cba39bcafc0388978b5c61c3f5b0fc0 Ask user whether he really wants to use non-grml folder --- diff --git a/grml2usb b/grml2usb index be6b227..598a173 100755 --- a/grml2usb +++ b/grml2usb @@ -1475,7 +1475,15 @@ def install(image, device): iso_mountpoint = image remove_image_mountpoint = False if os.path.isdir(image): - logging.info("Using %s as install base", image) + if options.force or os.path.exists(os.path.join(image, 'live')): + logging.info("Using %s as install base", image) + else: + q = raw_input("%s does not look like a grml system. " + "Do you really want to use this image? y/N " % image) + if q.lower() == 'y': + logging.info("Using %s as install base", image) + else: + logging.info("Skipping install base %s", image) else: logging.info("Using ISO %s", image) iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=os.path.abspath(options.tmpdir))