From 61bb7591253d761dbd1bbd6f558212429cb8296e Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 4 Feb 2012 12:08:15 +0100 Subject: [PATCH] xbmc-rpi: run lspci only if its supported Signed-off-by: Stephan Raue --- packages/mediacenter/xbmc-rpi/profile.d/xbmc.conf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/mediacenter/xbmc-rpi/profile.d/xbmc.conf b/packages/mediacenter/xbmc-rpi/profile.d/xbmc.conf index 7677f0d264..4288d432de 100644 --- a/packages/mediacenter/xbmc-rpi/profile.d/xbmc.conf +++ b/packages/mediacenter/xbmc-rpi/profile.d/xbmc.conf @@ -32,10 +32,14 @@ XBMC_HOME="/usr/share/xbmc" export XBMC_HOME -GPUDEVICE=$(lspci -n | grep 0300) GPUTYPE="OTHER" -[ "$(echo $GPUDEVICE | grep 8086)" ] && GPUTYPE="INTEL" # 8086 == INTEL -[ "$(echo $GPUDEVICE | grep 10de)" ] && GPUTYPE="NVIDIA" # 10de == NVIDIA -[ "$(echo $GPUDEVICE | grep 1002)" ] && GPUTYPE="AMD" # 1002 == AMD -export GPUTYPE \ No newline at end of file +if [ -x /usr/bin/lspci ]; then + GPUDEVICE=$(lspci -n | grep 0300) + + [ "$(echo $GPUDEVICE | grep 8086)" ] && GPUTYPE="INTEL" # 8086 == INTEL + [ "$(echo $GPUDEVICE | grep 10de)" ] && GPUTYPE="NVIDIA" # 10de == NVIDIA + [ "$(echo $GPUDEVICE | grep 1002)" ] && GPUTYPE="AMD" # 1002 == AMD +fi + +export GPUTYPE