From c053dcbb0b96a54f2aede1ac27f2e8c7c7219080 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Tue, 28 Feb 2017 10:55:35 +0100 Subject: [PATCH] add script that returns local pci(e) ids --- roles/yavdr-common/files/list_pci_ids.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 roles/yavdr-common/files/list_pci_ids.sh diff --git a/roles/yavdr-common/files/list_pci_ids.sh b/roles/yavdr-common/files/list_pci_ids.sh new file mode 100644 index 0000000..a43e0c3 --- /dev/null +++ b/roles/yavdr-common/files/list_pci_ids.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# return all vendor:device ids +# typical device path: +# /sys/devices/pci0000\:00/0000\:00\:1f.2/ + +for device in /sys/devices/pci*/*:*:*/; do + echo "$(cat "$device"/vendor):$(cat "$device"/device)" | sed 's/0x//g' +done +