projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccb3784
)
Ask user whether he really wants to use non-grml folder
author
Lukas Prokop
<admin@lukas-prokop.at>
Fri, 14 Feb 2014 11:28:29 +0000
(12:28 +0100)
committer
Lukas Prokop
<admin@lukas-prokop.at>
Fri, 14 Feb 2014 11:30:21 +0000
(12:30 +0100)
grml2usb
patch
|
blob
|
history
diff --git
a/grml2usb
b/grml2usb
index
be6b227
..
598a173
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-1475,7
+1475,15
@@
def install(image, device):
iso_mountpoint = image
remove_image_mountpoint = False
if os.path.isdir(image):
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))
else:
logging.info("Using ISO %s", image)
iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=os.path.abspath(options.tmpdir))