Skip to content

main/syslinux: handle floats in update-extlinux

Bryan Kaplan requested to merge bryan/aports:fix-update-extlinux-floats into master

If the user assigns a float to timeout in update-extlinux.conf, a problem is created in which shell arithmetic causes the update-extlinux to fail without helpful output.

This change-set fixes that problem by modifying update-extlinux with type-checking, optional coercion, and output, as follows:

  • When run with --warn-only, update-extlinux now produces a warning which states that it's flooring the assigned float, and then proceeds to do just that.

  • When run without --warn-only, update-extlinux now produces an error which states that the assigned float is invalid and then exits non-zero.

Additionally, herein a superficial modification is made to the offending shell arithmetic, to conform its variable expansion to our style guide.

Merge request reports