fi
done
+indent=' '
+submenu_indent=
+if [ -n "${GRUB_SUBMENU}" ] && [ -n "${iso_list}" ] ; then
+ echo "submenu \"${GRUB_SUBMENU}\" \$menuentry_id_option \"grml-rescueboot\" {"
+ submenu_indent="${indent}"
+fi
+
for grmliso in $iso_list ; do
rel_dirname="$(dirname $(make_system_path_relative_to_its_root $grmliso))"
grml="$(basename $grmliso)"
echo "Found Grml ISO image: $grmliso" >&2
title="Grml Rescue System ($grml)"
- grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /")
+ grub_prep=$(prepare_grub_to_access_device "${device}" | sed -e "s/^/${indent}/")
- cat << EOF
+ sed -e "s/^/${submenu_indent}/" << EOF
menuentry "${title}" {
${grub_prep}
iso_path="${rel_dirname%/}/${grml}"
EOF
done
+if [ -n "${GRUB_SUBMENU}" ] && [ -n "${iso_list}" ] ; then
+ echo "} # end submenu \"${GRUB_SUBMENU}\""
+fi
+
## END OF FILE #################################################################
# Location of ISOs:
# ISO_LOCATION="/boot/grml/"
+# To place the rescue boot entries into a GRUB submenu,
+# set this to the desired menu name:
+# GRUB_SUBMENU='Grml Rescue Boot menu'
+
# To set any specific bootoptions for rescue images
# present in /boot/grml just set and enable the following option:
# CUSTOM_BOOTOPTIONS='ssh=password lang=de'