From 91d2b4f4a46af1daec3b471f81664280c7cd407e Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 24 Aug 2008 13:47:24 +0000 Subject: Fix for xserver plugin script not returning in some cases. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2091 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/xserver/XX_xserver.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'os-plugins/plugins/xserver') diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 25fef443..0280b2c6 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -36,6 +36,7 @@ if [ -e /initramfs/plugin-conf/xserver.conf ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'xserver' os-plugin ..."; xmodule=$(grep -i -m 1 "XFree86 v4 Server Module" /etc/hwinfo.data | \ sed "s/.*v4 Server Module: //") + # proprietary ATI/NVidia modules listed a different way with hwinfo [ -z "$xmodule" ] || error "${hcfg_hwsetup}" nonfatal echo -e "# $xfc\n# autogenerated X hardware configuration by the xserver \ plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN INSTEAD" \ @@ -136,17 +137,17 @@ Section "DRI" EndSection ' >> $xfc # if no module was detected, stick to vesa module - if [ -z "$xmodule" ] ; then - xmodule=vesa - error "xserver: no proper module was detected" + if [ -n "$xmodule" ] ; then + sed "s/vesa/$xmodule/;s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc + else + sed "s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc fi - sed "s/vesa/$xmodule/;s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc # these directories might be distro specific for file in /var/lib/xkb/compiled ; do testmkd /mnt/${file} done # if a synaptic touchpad is present, add it to the device list - if grep -E "ynaptics" /etc/hwinfo.mouse ; then + if grep -q -E "ynaptics" /etc/hwinfo.mouse ; then sed -e '/\"CorePointer\"/ { a\ EndSection\ -- cgit v1.2.3-55-g7522