diff options
-rwxr-xr-x | scripts/image_signing/ensure_sane_lsb-release.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh index 4d958b34..007ded0f 100755 --- a/scripts/image_signing/ensure_sane_lsb-release.sh +++ b/scripts/image_signing/ensure_sane_lsb-release.sh @@ -123,8 +123,15 @@ main() { info "Loading config from ${configfile}" . "$configfile" || return 1 - local rootfs=$(make_temp_dir) - mount_image_partition_ro "$image" 3 "$rootfs" + local rootfs + if [[ -d "${image}" ]]; then + # We're given a mounted rootfs. + rootfs="${image}" + else + # Mount the disk image. + rootfs=$(make_temp_dir) + mount_image_partition_ro "$image" 3 "$rootfs" + fi local lsb="$rootfs/$LSB_FILE" # Basic syntax check first. |