From ca458e3c9b25c3efc10532eb8e31bdcff44dc321 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Wed, 11 Aug 2004 13:55:03 +0000 Subject: [PATCH] Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=492 - /etc/init.d/xprint did not source xorg.conf for font paths additionally to xfree86 config files --- Xprint/etc/init.d/xprint.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Xprint/etc/init.d/xprint.cpp b/Xprint/etc/init.d/xprint.cpp index 51fb89cca..40ab6fbae 100644 --- a/Xprint/etc/init.d/xprint.cpp +++ b/Xprint/etc/init.d/xprint.cpp @@ -263,17 +263,32 @@ get_fontlist_from_all_xfs_configs() get_fontlist_from_xf86config() { - srcxf86configfile="" - [ -f "/etc/X11/XF86Config-4" ] && srcxf86configfile="/etc/X11/XF86Config-4" - [ -f "/etc/X11/XF86Config" ] && srcxf86configfile="/etc/X11/XF86Config" + srcxconf="" + + XCOMM see xorg.conf(5x) manual page for the list of locations used here + [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf" ] && srcxconf="/etc/X11/xorg.conf" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf" + [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf-4" ] && srcxconf="/etc/X11/xorg.conf-4" + [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf" ] && srcxconf="/etc/X11/xorg.conf" + [ "${srcxconf}" = "" -a -f "/etc/xorg.conf" ] && srcxconf="/etc/xorg.conf" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf.${hostname}" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf-4" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf-4" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf.${hostname}" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf-4" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf-4" + [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf" + + XCOMM Xfree86 locations + [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config-4" ] && srcxconf="/etc/X11/XF86Config-4" + [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config" ] && srcxconf="/etc/X11/XF86Config" - if [ "${srcxf86configfile}" = "" ] ; then + if [ "${srcxconf}" = "" ] ; then return 0 fi currsection="" - cat "${srcxf86configfile}" | + cat "${srcxconf}" | while read i1 i2 i3 i4 ; do # Strip "\"" from I2 i2="${i2#\"}" ; i2="${i2%\"}"