From: Michael Prokop Date: Tue, 18 Jun 2013 15:18:48 +0000 (+0200) Subject: Read /proc/acpi/info only if the file exists, drop calls to acpi_available X-Git-Tag: v0.9.0~1 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=3644e97fe736423c0d43402d385fc2619e94a1b9;p=grml-hwinfo.git Read /proc/acpi/info only if the file exists, drop calls to acpi_available Inside e.g. KVM /proc/acpi/info doesn't exist. --- diff --git a/grml-hwinfo b/grml-hwinfo index 6cbda82..7884e4b 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -222,7 +222,10 @@ cd "${OUTDIR}" || exit 1 # power management exectest laptop-detect && laptop-detect >/dev/null 2>/dev/null && echo "0" > laptop_detected - exectest acpi_available && acpi_available && cat /proc/acpi/info > acpi_info + if [ -r /proc/acpi/info ] ; then + cat /proc/acpi/info > acpi_info + fi + exectest acpi && acpi > acpi 2> acpi.error && acpi -v > acpi.version [ -r /proc/apm/ ] && apm > apm