Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request rbrito#16 from mathieulj/master
Browse files Browse the repository at this point in the history
Tolerate quoted UUID syntax in /etc/fstab.

This makes the script more robust regarding the way that UUIDs are specified.
  • Loading branch information
rbrito authored Aug 10, 2018
2 parents 61624c4 + 56f0c8d commit 9a92e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usbmount
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [ "$1" = add ]; then
log info "executing command: mount $DEVNAME"
mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?"

elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then
elif grep -q "^[[:blank:]]*UUID=\"?$UUID\"?" /etc/fstab; then
log info "executing command: mount -U $UUID"
mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?"

Expand Down

0 comments on commit 9a92e7d

Please sign in to comment.