From bfe06ef14445970c793312453bc5ad12603f3a3d Mon Sep 17 00:00:00 2001 From: lodi Date: Sun, 24 Apr 2022 17:08:08 -0400 Subject: [PATCH] Allow devices to be filtered by PARTUUID or WWN --- bashmount | 2 +- bashmount.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bashmount b/bashmount index 26d37c9..17d62e4 100755 --- a/bashmount +++ b/bashmount @@ -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 diff --git a/bashmount.conf b/bashmount.conf index 66a4c16..b6f13aa 100644 --- a/bashmount.conf +++ b/bashmount.conf @@ -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