Skip to content

Commit

Permalink
Try using isoinfo(1) to extract an ISO image identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
iskunk committed Apr 8, 2023
1 parent 8c499f1 commit 517bcbd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 15 additions & 3 deletions 42_grml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,17 @@ get_dependencies() {
break
done
echo $dependencies

}


get_iso_identifier() {
local iso="$1"
local id=
if isoinfo --version >/dev/null 2>&1 ; then
id=$(isoinfo -d -i "${iso}" | grep '^Volume id:' | sed -e 's/^[^:]*: *//')
[ -n "${id}" ] || id=$(isoinfo -d -i "${iso}" | grep '^Application id:' | sed -e 's/^[^:]*: *//')
fi
echo "${id}"
}

iso_list=""
for file in "${ISO_LOCATION}"/*.iso ; do
Expand Down Expand Up @@ -111,7 +118,12 @@ for grmliso in $iso_list ; do
esac

echo "Found Grml ISO image: $grmliso" >&2
title="Grml Rescue System ($grml)"
iso_id=$(get_iso_identifier "${grmliso}")
if [ -n "${iso_id}" ] ; then
title="${iso_id} (${grml})"
else
title="Grml Rescue System (${grml})"
fi
grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /")

cat << EOF
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Depends:
${shlibs:Depends},
Recommends:
debian-keyring,
genisoimage,
gpgv,
wget,
Description: Integrates Grml ISO booting into GRUB
Expand Down

0 comments on commit 517bcbd

Please sign in to comment.