Skip to content

Commit

Permalink
show serial numbers of devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed May 15, 2021
1 parent 9e01bd1 commit 5de558f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/task_inventory
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ inventory() {
if [ -d /sys/firmware/efi ]; then
efibootmgr
fi

echo List serial numbers of devices
cd /sys/class/dmi/id
grep . *_serial 2>/dev/null| sed -e 's/:/: /'| egrep -iv 'serial: 0123456789|: Not |N/A|:[[:blank:]]+$'
lsblk -dno name,serial
}

if [ X$verbose = X1 ]; then
Expand Down

0 comments on commit 5de558f

Please sign in to comment.