This change breaks UUID matching in /etc/fstab on Ubuntu 18.04.1 (and probably most other OS).
The problem is that it tries to match using "? but ? is not a basic regular expression (BRE) metacharacter. ? is an extended regular expression (ERE) metacharacter so grep needs the "-E" parameter as follows:
elif egrep -q "^[[:blank:]]*UUID=\"?$UUID\"?" /etc/fstab; then
It will now work.
EDIT: Changed "grep -E" to "egrep" to be consistent with the rest of the code.
https://github.com/rbrito/usbmount/blob/9a92e7d622662380f4329e0db17e263509715722/usbmount#L109
This change breaks UUID matching in /etc/fstab on Ubuntu 18.04.1 (and probably most other OS).
The problem is that it tries to match using "? but ? is not a basic regular expression (BRE) metacharacter. ? is an extended regular expression (ERE) metacharacter so grep needs the "-E" parameter as follows:
elif egrep -q "^[[:blank:]]*UUID=\"?$UUID\"?" /etc/fstab; then
It will now work.
EDIT: Changed "grep -E" to "egrep" to be consistent with the rest of the code.