diff options
author | Bastian Wissler | 2009-01-27 16:52:28 +0100 |
---|---|---|
committer | Bastian Wissler | 2009-01-27 16:52:28 +0100 |
commit | debabad9a0a6ca31f5f9c8388d0f905525870085 (patch) | |
tree | 3ea62cedc7d1cf51dd8140b79ac955bb2a37ce89 /os-plugins | |
parent | * postinstall stuff added to deb templates (diff) | |
download | core-debabad9a0a6ca31f5f9c8388d0f905525870085.tar.gz core-debabad9a0a6ca31f5f9c8388d0f905525870085.tar.xz core-debabad9a0a6ca31f5f9c8388d0f905525870085.zip |
xserver plugin:
* fixed wrong checkin of XX_xserver.sh
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2532 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/xserver/XX_xserver.sh | 99 |
1 files changed, 60 insertions, 39 deletions
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 5b2f3815..fbbd21f0 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -36,8 +36,7 @@ testmkd ${glliblinks} if [ -e /initramfs/plugin-conf/xserver.conf -a \ ! -f /rootfs/etc/X11/xorg.conf ]; then . /initramfs/plugin-conf/xserver.conf - # keyboard setup - localization "${country}" + # do not start any configuration if the admin provided a preconfigured # xorg.conf in /rootfs/etc/X11/xorg.conf if [ $xserver_active -ne 0 -a ! -f /rootfs/${xfc#/mnt} ]; then @@ -46,12 +45,12 @@ if [ -e /initramfs/plugin-conf/xserver.conf -a \ sed "s/.*v4 Server Module: //") # proprietary ATI/NVidia modules listed a different way with hwinfo [ -z "$xmodule" ] || error "${hcfg_hwsetup}" nonfatal - + ###################################################################### # begin proprietary drivers section (xorg.conf part) ###################################################################### - set -x + waitfor /etc/hwinfo.data 10000 if [ $(grep -i -m 1 'Module: fglrx' \ /etc/hwinfo.data | wc -l) -ge "1" -a $xserver_prefnongpl -eq 1 ] then @@ -103,9 +102,9 @@ ${PLUGIN_ROOTFS}/usr/X11R6/lib/modules/\," ###################################################################### - 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" \ - > $xfc + echo -e "# ${xfc#/mnt*}\n# autogenerated X hardware configuration by the \ +xserver plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN \ +INSTEAD" > $xfc echo ' Section "Files" ModulePath "/usr/lib/xorg/modules/" @@ -129,13 +128,12 @@ Section "Module" Load "dri" EndSection Section "InputDevice" - Identifier "Generic Keyboard" + Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" - Option "XkbVariant" "nodeadkeys" EndSection Section "InputDevice" Identifier "Generic Mouse" @@ -146,27 +144,6 @@ Section "InputDevice" # Option "Emulate3Buttons" "true" Option "CorePointer" EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Stylus" - Option "Device" "/dev/input/wacom" - Option "Type" "stylus" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Eraser" - Option "Device" "/dev/input/wacom" - Option "Type" "eraser" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Cursor" - Option "Device" "/dev/input/wacom" - Option "Type" "cursor" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection Section "Device" Identifier "Generic Video Card" Driver "vesa" @@ -194,20 +171,23 @@ Section "ServerLayout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Generic Mouse" - InputDevice "Stylus" "SendCoreEvents" - InputDevice "Cursor" "SendCoreEvents" - InputDevice "Eraser" "SendCoreEvents" EndSection Section "DRI" Mode 0666 -EndSection -' >> $xfc +EndSection' >> $xfc + # keyboard setup (fill XKEYBOARD) + localization "${country}" # if no module was detected, stick to vesa module if [ -n "$xmodule" ] ; then sed "s/vesa/$xmodule/;s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc else sed "s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc fi + # set nodeadkeys for special layouts + if [ ${XKEYBOARD} = "de" ]; then + sed -e '/\"XkbLayout\"/a\\ \ Option "XkbVariant" "nodeadkeys"' \ + -i $xfc + fi # these directories might be distro specific for file in /var/lib/xkb/compiled ; do testmkd /mnt/${file} @@ -244,7 +224,6 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" ln -fs ${PLUGIN_ROOTFS}/usr/lib/libGL.so.1.2 ${glliblinks}/libGL.so ln -fs ${PLUGIN_ROOTFS}/usr/lib/libGL.so.1.2 ${glliblinks}/libGL.so.1 ln -fs ${PLUGIN_ROOTFS}/usr/lib/libGL.so.1.2 ${glliblinks}/libGL.so.1.2 - # impossible to load it directly via stage3 insmod - yes, somehow this is too big chroot /mnt /sbin/insmod ${PLUGIN_ROOTFS}/modules/fglrx.ko # we need some pci.ids for fglrx driver @@ -267,9 +246,45 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" ln -sf /usr/lib/libGL_MESA.so.1.2 /mnt/var/X11R6/lib/libGL.so.1.2 fi fi - - - [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."; + + # check if tablet hardware available, read device information from file + if [ -e /etc/tablet.conf ]; then + . /etc/tablet.conf + echo -e 'Section "InputDevice" + Driver "wacom" + Identifier "Stylus" + Option "Device" "/dev/input/wacom" + Option "Type" "stylus" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Pad" + Option "Device" "/dev/input/wacom" + Option "Type" "pad" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Eraser" + Option "Device" "/dev/input/wacom" + Option "Type" "eraser" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Cursor" + Option "Device" "/dev/input/wacom" + Option "Type" "cursor" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection' >> ${xfc} + sed -e "s,/dev/input/wacom,/dev/${wacomdev}," \ + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Stylus" "SendCoreEvents"' \ + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Pad" "SendCoreEvents"' \ + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Cursor" "SendCoreEvents"' \ + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Eraser" "SendCoreEvents"' \ + -i ${xfc} + fi # some configurations produce no proper screen resolution without # Horizsync and Vertrefresh set (more enhancements might be needed for @@ -303,5 +318,11 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" # run distro specific generated stage3 script [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh + + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..." + fi +elif [ ! -e /initramfs/plugin-conf/xserver.conf ]; then + [ $DEBUGLEVEL -gt 2 ] && \ + echo "No configuration file found for xserver plugin." fi |