X-Git-Url: https://git.grml.org/?p=grml-rescueboot.git;a=blobdiff_plain;f=42_grml;fp=42_grml;h=d84d1690ca5a5183604f2d164b236afbf156da5b;hp=7fc45babcfbed8cd4f13b0d36929830ea296232f;hb=068c824b8154ed30be364cc6f4499c9a821fc1e4;hpb=55e0d9c03740f19e752fea29ff785b2a6fc522f2 diff --git a/42_grml b/42_grml index 7fc45ba..d84d169 100755 --- a/42_grml +++ b/42_grml @@ -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 @@ -118,8 +125,13 @@ for grmliso in $iso_list ; do esac echo "Found Grml ISO image: $grmliso" >&2 - title="Grml Rescue System ($grml)" - grub_prep=$(prepare_grub_to_access_device "${device}" | sed -e "s/^/${indent}/") + 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/^/ /") sed -e "s/^/${submenu_indent}/" << EOF menuentry "${title}" {