From a1cd1958ba17e45c5e0e74bcac81c102c623d21d Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 1 Mar 2018 14:31:59 +0100 Subject: [PATCH] Replace mount by xorriso (#4) Because that fucking lxd doesn't want to allow to mount an iso... --- add-firmware-to | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/add-firmware-to b/add-firmware-to index 53a93c0..eca6303 100755 --- a/add-firmware-to +++ b/add-firmware-to @@ -111,28 +111,10 @@ fi if is_iso "$file"; then isotmp="$(mktemp -d)" - tmpmnt="$isotmp/tmpmnt" buildtree="$isotmp/buildtree" BUILD_DIR=$(pwd) - mkdir "$tmpmnt" - if am_root; then - MOUNT="mount" - UMOUNT="umount" - elif [ -x /usr/bin/sudo ]; then - echo "Attempting to use sudo to gain mount capabilities..." - MOUNT="sudo mount" - UMOUNT="sudo umount" - else - echo "WARNING: Couldn't find sudo and not running as root." >&2 - echo "WARNING: Trying to loopback mount the iso anyway..." >&2 - MOUNT="mount" - UMOUNT="umount" - fi - $MOUNT "$file" "$tmpmnt" -o loop - cp -a "$tmpmnt" "$buildtree" - $UMOUNT "$tmpmnt" - rmdir "$tmpmnt" + xorriso -osirrox on -indev "$file" -extract / "$buildtree" chmod -R u+w "$buildtree"