mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-24 21:47:26 +00:00
using udevadm to get device serial
This commit is contained in:
@@ -568,7 +568,7 @@ if [ "$IMPORT_DISKS" == "yes" ]; then
|
||||
for SELECTION in $SELECTIONS; do
|
||||
((++SCSI_NR))
|
||||
|
||||
ID_SERIAL=$(echo "$SELECTION" | rev | cut -d'_' -f1 | rev)
|
||||
ID_SERIAL=$(udevadm info --query=property --value --property=ID_SERIAL_SHORT "/dev/disk/by-id/$SELECTION")
|
||||
ID_SERIAL=${ID_SERIAL:0:20}
|
||||
|
||||
qm set $VMID --scsi$SCSI_NR /dev/disk/by-id/$SELECTION,serial=$ID_SERIAL
|
||||
|
||||
Reference in New Issue
Block a user