logging.info("Using %s as install base", image)
else:
logging.info("Using ISO %s", image)
- iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=options.tmpdir)
+ iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=os.path.abspath(options.tmpdir))
register_tmpfile(iso_mountpoint)
remove_image_mountpoint = True
try:
def remove_mountpoint(mountpoint):
- """remove a registred mountpoint
+ """remove a registered mountpoint
"""
try:
return 0
mbr_device, partition_number = get_device_from_partition(device)
- if not partition_number:
+ if partition_number is None:
logging.warn("Could not detect partition number, not activating partition")
# if we get e.g. /dev/loop1 as device we don't want to put the MBR
def load_loop():
"""Runs modprobe loop and throws away it's output"""
+ if not which("modprobe"):
+ logging.critical("Fatal: modprobe not available, can not continue - sorry.")
+ logging.critical("Hint: is /sbin missing in PATH?")
+ sys.exit(1)
+
proc = subprocess.Popen(["modprobe", "loop"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
proc.wait()