Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use udevadm shellouts if possible #3

Open
jaypipes opened this issue Jun 2, 2017 · 1 comment
Open

Don't use udevadm shellouts if possible #3

jaypipes opened this issue Jun 2, 2017 · 1 comment

Comments

@jaypipes
Copy link
Owner

jaypipes commented Jun 2, 2017

When writing https://github.com/jaypipes/ghw, I figured out a way around using udevadm for finding things like the disk serial numbers. Refactor the udevadm shellouts out of hwk

jaypipes added a commit that referenced this issue Jun 2, 2017
Replaces the use of udevadm output -- which cannot be accessed or isn't
available in some VMs or containers like Travis CI build environments -- with
simple file reads against sysfs. This required removing the label and uuid
attributes of the Partition object temporarily until I can figure out a better
way of getting this information.

Issue #3
jaypipes added a commit that referenced this issue Jun 3, 2017
There's no need to use udevadm to get a NIC's MAC address. We can query
for /sys/class/net/$DEVICE/addr_assign_type and
/sys/class/net/$DEVICE?address for this information.

Addresses issue #3
@jaypipes
Copy link
Owner Author

jaypipes commented Jun 3, 2017

udevadm uses an in-memory database derived from parsing the PCI vendor/model information here:

http://pci-ids.ucw.cz/v2.2/pci.ids

Not sure if it's worth doing something similar :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant