I've always used systemd-detect-virt for this same use case.

Can you confirm if it works both on sysvinit and systemd based
init setups ?

Bruce

In message: [meta-virtualization] [PATCH] virt-what: add new recipe
on 06/04/2022 Ross Burton wrote:

> Signed-off-by: Ross Burton <[email protected]>
> ---
>  recipes-extended/virt-what/virt-what_1.21.bb | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100644 recipes-extended/virt-what/virt-what_1.21.bb
> 
> diff --git a/recipes-extended/virt-what/virt-what_1.21.bb 
> b/recipes-extended/virt-what/virt-what_1.21.bb
> new file mode 100644
> index 0000000..aa235b3
> --- /dev/null
> +++ b/recipes-extended/virt-what/virt-what_1.21.bb
> @@ -0,0 +1,11 @@
> +SUMMARY = "Detect if we are running in a virtual machine"
> +HOMEPAGE = "https://people.redhat.com/~rjones/virt-what/";
> +LICENSE = "GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +SRC_URI = "https://people.redhat.com/~rjones/virt-what/files/${BP}.tar.gz";
> +SRC_URI[sha256sum] = 
> "12cb455334aa4cfd53ab78f27e2252e94d1f676dd093f48327ed94d8080d1f7b"
> +
> +DEPENDS = "perl-native"
> +
> +inherit autotools
> -- 
> 2.25.1
> 

> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7127): 
https://lists.yoctoproject.org/g/meta-virtualization/message/7127
Mute This Topic: https://lists.yoctoproject.org/mt/90293376/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to