Skip to content

Commit

Permalink
Account for multiple whitespaces on fstab
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferk authored Jan 4, 2023
1 parent 2d176de commit da91e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion media-automount
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ then
for dir in "$mediadir"/*
do
# Only clean non active mountpoints that have no /etc/fstab entry
if [ -d "$dir" ] && ! mountpoint -q "$dir" && ! grep -q "^\s*[^#\s]\+\s${dir}" /etc/fstab; then
if [ -d "$dir" ] && ! mountpoint -q "$dir" && ! grep -q "^\s*[^#\s]\+\s\+${dir}" /etc/fstab; then
rmdir "$dir"
fi
done
Expand Down

0 comments on commit da91e63

Please sign in to comment.