summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-08-05 21:07:58 +0200
committerDirk von Suchodoletz2008-08-05 21:07:58 +0200
commit51f63ca897833fcb430b0730dc537f1328ef912f (patch)
tree9ab830c52d150e1ca044663ed9630ee38ad3eedb /os-plugins
parentCleanups for some plugins ... (diff)
downloadcore-51f63ca897833fcb430b0730dc537f1328ef912f.tar.gz
core-51f63ca897833fcb430b0730dc537f1328ef912f.tar.xz
core-51f63ca897833fcb430b0730dc537f1328ef912f.zip
First try for the new Xorg configuration (xserver plugin). To be
extended, refined ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1961 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/plugins/xserver/XX_xserver.sh108
1 files changed, 104 insertions, 4 deletions
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh
index 95d7afc2..4f2c4c0f 100644
--- a/os-plugins/plugins/xserver/XX_xserver.sh
+++ b/os-plugins/plugins/xserver/XX_xserver.sh
@@ -14,13 +14,113 @@
# stage3 part of 'xserver' plugin - the runlevel script setting up the Xorg
# configuration and checking for 3D capabilities and non-gpl drivers
+xfc="/mnt/etc/X11/xorg.conf"
+
if [ -e /initramfs/plugin-conf/xserver.conf ]; then
. /initramfs/plugin-conf/xserver.conf
- if [ $example_active -ne 0 ]; then
+ # do not start any configuration if the admin provided a preconfigured
+ # xorg.conf in /rootfs/etc/X11/xorg.conf
+ if [ $example_active -ne 0 -a ! -f /rootfs/${xfc#/mnt} ]; 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: //")
+ [ -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" \
+ > $xfc
+ echo '
+Section "Files"
+EndSection
+Section "ServerFlags"
+ Option "AllowMouseOpenFail"
+ Option "blank time" "5"
+ Option "standby time" "10"
+ Option "suspend time" "15"
+ Option "off time" "20"
+EndSection
+Section "Module"
+ Load "i2c"
+ Load "bitmap"
+ Load "ddc"
+ Load "extmod"
+ Load "freetype"
+ Load "int10"
+ Load "vbe"
+ Load "glx"
+ Load "dri"
+EndSection
+Section "InputDevice"
+ Identifier "Generic Keyboard"
+ Driver "kbd"
+ Option "CoreKeyboard"
+ Option "XkbRules" "xorg"
+ Option "XkbModel" "pc105"
+ Option "XkbLayout" "XKEYBOARD"
+ Option "XkbVariant" "nodeadkeys"
+EndSection
+Section "InputDevice"
+ Identifier "Generic Mouse"
+ Driver "mouse"
+ Option "CorePointer"
+ Option "Device" "/dev/input/mice"
+ Option "Protocol" "ImPS/2"
+ Option "ZAxisMapping" "4 5"
+ Option "Emulate3Buttons" "true"
+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"
+EndSection
+Section "Monitor"
+ Identifier "Generic Display"
+ Option "DPMS"
+EndSection
+Section "Screen"
+ Identifier "Default Screen"
+ Device "Generic Video Card"
+ Monitor "Generic Display"
+ DefaultDepth 24
+ SubSection "Display"
+ Depth 24
+ Modes "1024x768" "800x600"
+ EndSubSection
+EndSection
+Section "ServerLayout"
+ Identifier "Default Layout"
+ 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
+ sed "s/vesa/$xmodule/" -i $xfc
- [ $DEBUGLEVEL -gt 0 ] && echo "done with 'bindrivers' os-plugin ...";
+ [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ...";
fi
fi