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

Allow devices to be filtered by PARTUUID or WWN #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bashmount
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ list_devices() {
for devname in "${all[@]}"; do
# Hide excluded devices.
for string in "${exclude[@]}"; do
lsblk -dPno NAME,TYPE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL,UUID "$devname" \
lsblk -dPno NAME,TYPE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL,UUID,PARTUUID,WWN "$devname" \
| grep -E "$string" >/dev/null 2>&1
(( $? )) || continue 2
done
Expand Down
2 changes: 2 additions & 0 deletions bashmount.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
### exclude+=( 'LABEL="secret"' )
### exclude+=( 'MOUNTPOINT="/"' )
### exclude+=( 'UUID="0c4d6d9c-87a2-4579-b2ae-35b0790c718a"' )
### exclude+=( 'PARTUUID="5b99bf8a-1abc-4ea3-8e50-9006a8552a07"' )
### exclude+=( 'WWN="0x500277a4100c4e21"' )
###

# Set filemanager command to use when performing the "open" command. The mount
Expand Down