This commit is contained in:
rootzoll
2025-01-08 13:15:02 +01:00
parent 42dfce6cee
commit f0c960c7d2

View File

@@ -426,8 +426,9 @@ if [ "$1" = "status" ]; then
# use: find_by_id_filename [DEVICENAME]
find_by_id_filename() {
local device="$1" # e.g. "sdb"
local device="$1"
for dev in /dev/disk/by-id/*; do
echo "# ${dev}"
if [ "$(readlink -f "$dev")" = "/dev/$device" ]; then
basename "$dev"
fi