Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID matching in /etc/fstab doesn't work #18

Open
ColinTaylorUK opened this issue Oct 20, 2018 · 0 comments
Open

UUID matching in /etc/fstab doesn't work #18

ColinTaylorUK opened this issue Oct 20, 2018 · 0 comments

Comments

@ColinTaylorUK
Copy link

ColinTaylorUK commented Oct 20, 2018

elif grep -q "^[[:blank:]]*UUID=\"?$UUID\"?" /etc/fstab; then

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant