xorg: don't fail if no devices are conifgured; this makes probe work on Raspberry Pi with fbdev

This commit is contained in:
Silvan Calarco 2012-09-01 20:49:24 +02:00
parent 4af6f32896
commit b8ce4a9a82

View File

@ -168,7 +168,7 @@ install -m 1777 -o root -g root -d /tmp/.ICE-unix
if [ -e /dev/nvhost-ctrl ]; then
VIDEO_DEV="NVIDIA TEGRA"
else
VIDEO_DEV="`lspci -n | grep " 03[0-9][0-9]: "`"
VIDEO_DEV="`lspci -n 2>/dev/null | grep " 03[0-9][0-9]: "`"
fi
if [ -e $XORGCONF -a -e $postpluglibdir/xorg.cache ]; then
@ -236,17 +236,22 @@ if [ ! -e $XORGCONF ]; then
# sync to avoid filesystem corruption in case of system hang on probe
sync
HOME=/tmp Xorg :5 -configure 2>>$logfile || {
logmsg "$me" "warning: xorg autoprobed configuration failed; enabling experimental xorg autoconfig"
rm -f /tmp/xorg.conf.new
HOME=/tmp Xorg :5 -configure 2>>$logfile
RET=$?
if [ $RET -ne 0 -o ! -e /tmp/xorg.conf.new ]; then
logmsg "$me" "warning: xorg autoprobed configuration failed; using xorg autoconfig"
VIDEO_DEV="autoprobe"
echo "# Dummy empty xorg.conf file created by postplug" > $XORGCONF
xorg_configure_loginmanager
xorg_d_configure_input
exit 1
}
mv /tmp/xorg.conf.new $XORGCONF
sed -i "s|#DisplaySize|DisplaySize|" $XORGCONF
# disable autoconfigured multiple screens
sed -i "s|^\([[:space:]]*Screen[[:space:]]*[1-9].*\)|#\1|" $XORGCONF
else
mv /tmp/xorg.conf.new $XORGCONF
sed -i "s|#DisplaySize|DisplaySize|" $XORGCONF
# disable autoconfigured multiple screens
sed -i "s|^\([[:space:]]*Screen[[:space:]]*[1-9].*\)|#\1|" $XORGCONF
fi
fi
let "CONFCREATED = 1"