Skip to content

Commit

Permalink
Allow more ways to detect disk to deactivate
Browse files Browse the repository at this point in the history
  • Loading branch information
immae authored and mergify[bot] committed Apr 25, 2024
1 parent db11504 commit a816daa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion disk-deactivate/disk-deactivate.jq
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def walk:

def init:
"/dev/\(.name)" as $disk |
if $disk == $disk_to_clear then
"/dev/disk/by-id/\(."id-link")" as $disk_by_id |
"/dev/disk/by-id/\(.tran)-\(.id)" as $disk_by_id2 |
"/dev/disk/by-id/\(.tran)-\(.wwn)" as $disk_by_wwn |
if $disk == $disk_to_clear or $disk_by_id == $disk_to_clear or $disk_by_id2 == $disk_to_clear or $disk_by_wwn == $disk_to_clear then
[
"set -fu",
walk
Expand Down

0 comments on commit a816daa

Please sign in to comment.