From 0ab2a7261eef1435cf5b0ce1180e826f4c663414 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 23 Apr 2013 17:20:46 +0200 Subject: [PATCH] Normalize temporary working directory to not fail with relative directory path When invoking "grml2is -t tmpdir ..." then the kernel and initrd files receive a wrong leading directory path on the resulting ISO, leading to a broken ISO. Since specifying a relative path ("-t tmpdir" instead of "-t ${PWD}/tmpdir") should be possible as well let's just normalize it. --- grml2iso | 2 +- grml2usb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grml2iso b/grml2iso index a2ef849..e84e267 100755 --- a/grml2iso +++ b/grml2iso @@ -91,7 +91,7 @@ Options: r) GRML2USB_OPTS+=(--remove-bootoption="$OPTARG");; p) GRML2USB_OPTS+=("$OPTARG");; s) URI="$OPTARG";; - t) WRKDIR="$OPTARG";; + t) WRKDIR="$(readlink -f "$OPTARG")";; ?) usage 2;; esac done diff --git a/grml2usb b/grml2usb index c696623..e2cffe8 100755 --- a/grml2usb +++ b/grml2usb @@ -1472,7 +1472,7 @@ def install(image, device): 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: -- 2.1.4