X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fconfigure-xorg;h=0bbb39c07b0818b68c654352f6066a53fe31ac50;hb=16f1a75d215e027ad746fc60dd10cd456f07f8d6;hp=d6c69f61d724d7bb85476c07249c0a67dbcb7494;hpb=8538236bf31cbcb8acf1b7256202539f90d3fe48;p=hvlinux.git diff --git a/stage4/configure-xorg b/stage4/configure-xorg index d6c69f6..0bbb39c 100755 --- a/stage4/configure-xorg +++ b/stage4/configure-xorg @@ -1,12 +1,6 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. +#!/bin/bash -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +source ../functions/main # Used by startx cat > /etc/skel/.xinitrc << "EOF" @@ -109,12 +103,13 @@ cat >> /etc/sysconfig/createfiles << "EOF" /tmp/.ICE-unix dir 1777 root root EOF -# Packages in Xorg store their configuration files in $XORG_PREFIX/lib/X11 +# Packages in Xorg store their configuration files in /usr/lib/X11 # by default. This is strictly against FHS guidelines. Correct the # installation /etc/X11 and create symlinks in the original location: mkdir -v -p /etc/X11 -for file in ${XORG_PREFIX}/{lib/X11/{xinit,xdm},share/X11/app-defaults}; do - if [ ! -h ${file} ]; then + +for file in /usr/{lib/X11/{xinit,xdm},share/X11/app-defaults}; do + if [ -f ${file} -a ! -h ${file} ]; then mv -v ${file} /etc/X11/ 2> /dev/null ln -svfT /etc/X11/$(basename $file) $file fi @@ -128,62 +123,15 @@ if [ "x${INST_TYPE}" = "xltsp-server" ]; then chmod 444 /etc/X11/xdm/Xaccess fi - -exit 0 - - - # Many package are still trying to find X in /usr/X11R6. # Until then, you can create a symbolic link to satisfy the /usr/X11R6 # requirement so that you won't be inconvenienced with a package build # failure due to this known issue. -#ln -scfT ${XORG_PREFIX} /usr/X11R6 +#ln -scfT /usr /usr/X11R6 -cat > /etc/X11/xorg.conf << "EOF" +cat > /etc/X11/xorg.conf.template << "EOF" # xorg.conf # -# ********************************************************************** -# Files section. -# ********************************************************************** -Section "Files" - RgbPath "/usr/X11R6/lib/X11/rgb" - ModulePath "/usr/X11R6/lib/modules" # Module search path - FontPath "_HV_FONTS_PATH_/TrueType" - - # Standard XFree86 Fonts - FontPath "/usr/X11R6/lib/X11/fonts/TTF" - FontPath "/usr/X11R6/lib/X11/fonts/Type1" - FontPath "/usr/X11R6/lib/X11/fonts/misc/:unscaled" - FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" - FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" - FontPath "/usr/X11R6/lib/X11/fonts/local" - FontPath "/usr/X11R6/lib/X11/fonts/Speedo" - FontPath "/usr/X11R6/lib/X11/fonts/misc/" - FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" - FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" -EndSection - -# ********************************************************************** -# Dynamically loadable modules section. -# ********************************************************************** -Section "Module" - Load "dbe" # Double buffer extension - - # This loads the miscellaneous extensions module, and disables - # initialisation of the XFree86-DGA extension within that module. - SubSection "extmod" - Option "omit xfree86-dga" # don't initialise the DGA extension - EndSubSection - - # This loads the Type1 and FreeType font modules - Load "type1" - Load "speedo" - Load "freetype" - - Load "glx" - Load "dri" -EndSection - # ********************************************************************** # Input devices. # ********************************************************************** @@ -237,7 +185,7 @@ Section "Screen" DefaultColorDepth 24 Subsection "Display" Depth 24 - Modes "1024x768" "800x600" + Modes "1024x768" "800x600" ViewPort 0 0 EndSubsection EndSection @@ -254,11 +202,10 @@ EndSection EOF -# The ! character is the SED delimiter -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/xorg.conf -sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/xorg.conf -sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/xorg.conf -sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/xorg.conf -sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/xorg.conf +sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/xorg.conf.template +sed -i -e "s!_VIDEO_CARD_DRIVER_!${XORG_VIDEO_DRIVER}!g" /etc/X11/xorg.conf.template +sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/xorg.conf.template +sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/xorg.conf.template +sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/xorg.conf.template exit $?