+2011-12-24 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * util/grub-install.in: Account for possible escaped comma in device
+ name.
+
2011-12-24 Vladimir Serbinenko <phcoder@gmail.com>
* util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
else
install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1
fi
- install_drive="`echo "${install_drive}" | sed -e s/,[a-z0-9,]*//g`"
+ install_drive="`echo "${install_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\1/'`"
fi
grub_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${grub_device}"`" || exit 1
# Strip partition number
- grub_partition="`echo "${grub_drive}" | sed -e 's/^[^,]*[,)]//; s/)$//'`"
- grub_drive="`echo "${grub_drive}" | sed -e s/,[a-z0-9,]*//g`"
+ grub_partition="`echo "${grub_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\3/'`"
+ grub_drive="`echo "${grub_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\1/'`"
if ([ "x$disk_module" != x ] && [ "x$disk_module" != xbiosdisk ]) || [ "x${grub_drive}" != "x${install_drive}" ] || ([ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${platform}" != x"ieee1275" ]); then
# generic method (used on coreboot and ata mod)
uuid="`"$grub_probe" --device-map="${device_map}" --target=fs_uuid --device "${grub_device}"`"
if [ x"$grub_partition" = x ]; then
prefix_drive="()"
else
- prefix_drive="(,$grub_partition)"
+ # Comma is already there
+ prefix_drive="($grub_partition)"
fi
fi
else