for isofile in $isopath/avira-rescue-system*.iso; do
  if [ -e "$isofile" ]; then
    regexp --set=isoname "$isopath/(.*)" "$isofile"
    submenu "$isoname ->" "$isofile" {
      iso_path="$2"
      loopback loop "$iso_path"
      menuentry "Start Avira Rescue System" {
        bootoptions="iso-scan/filename=$iso_path file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --"
        linux (loop)/casper/vmlinuz $bootoptions
        initrd (loop)/casper/initrd.lz
      }
      menuentry "Test memory" {
        bootoptions=""
        linux16 (loop)/install/mt86plus $bootoptions
      }
    }
  fi
done
