On Tue, 25 Mar 2025 06:16:38 +0100 Petter Reinholdtsen wrote: > I suspect running dmidecode and the equivalent modalias entry is a > better source for hardware model, try for example this: > > find /sys/devices -name modalias -print0 | xargs -0 sort -u|grep dmi > > For my Thinkpad X230 I get svnLENOVO and pvrThinkPadX230.
It turns out that since systemd 248, the hardware info is exposed by hostnamectl (no root), which also has machine-readable output. $ hostnamectl | grep Hardware This is sourced from either DMI or DeviceTree (for ARM) and can be customised in /etc/machine-info. Presumably it will get expanded over time to support other mechanisms on other platforms too. https://www.freedesktop.org/software/systemd/man/latest/machine-info.html#HARDWARE_VENDOR= In addition, lshw can do this too, but it requires root access. $ sudo lshw | head -n4 DMI/DT hardware info also contains arbitrary bytes, so you would need to safely convert it to the package name character set. Also, some users might want to name their packages after hostnames or hardware pet names or locations etc. So some ability to customise, from a default based on the hardware name, would be useful. -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part