diff options
author | Igor Galić <me+github@igalic.co> | 2019-12-12 01:32:14 +0100 |
---|---|---|
committer | Ryan Harper <ryan.harper@canonical.com> | 2019-12-11 18:32:14 -0600 |
commit | 11ef73e9500dcb325be85f8099a42d8d2e4caf95 (patch) | |
tree | e07ce0672b24d0b9aab37b668c2596841ce4b713 /packages | |
parent | 37ffa8d2bf1d56769a40fea26228b82e33ab1fff (diff) | |
download | vyos-cloud-init-11ef73e9500dcb325be85f8099a42d8d2e4caf95.tar.gz vyos-cloud-init-11ef73e9500dcb325be85f8099a42d8d2e4caf95.zip |
ds_identify: if /sys is not available use dmidecode (#42)
On non-Linux systems, `/sys` won't be available. In these cases, we can query `dmidecode(8)` directly. This PR implements a dmi_decode function to query the same fields ds-identify
would otherwise read from /sys. This path is taken when /sys isn't present. In addition to
adding dmidecode support, non-Linux systems also need to map in virtualization detection
as systemd-detect-virt is not present; on FreeBSD, use sysctl kern.vm_guest and provide a
mapping[1] between BSD values and those that match with systemd-detect-virt[2].
1. https://github.com/freebsd/freebsd/blob/master/sys/kern/subr_param.c#L149-L157
2. https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html
LP: #1852442
Diffstat (limited to 'packages')
0 files changed, 0 insertions, 0 deletions