[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using acpi information in conditional expression

From: Alexander 'Leo' Bergolth
Subject: using acpi information in conditional expression
Date: Sun, 22 Nov 2015 12:52:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20090320 Fedora/ Thunderbird/ Mnenhy/


Is it possible to use the output of lsacpi or lspci or
in a conditional expression?

I am using a dual-boot environment where the same box may boot natively or inside a VirtualBox VM. Thus I'd like to detect whether grub has been started inside VirtualBox or not in order to be able to set different defaults.

The output of lsacpi contains "OEM-ID: VBOX" if started inside VirtualBox. Is it possible to use that info in the grub config?

I didn't find a way to redirect the lsacpi output to a variable or a file to be able to use it with regex.

Do you have any hint?

Maybe inb/inl/inw could be used?

e-mail   ::: Leo.Bergolth (at)
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria

reply via email to

[Prev in Thread] Current Thread [Next in Thread]