[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GDM config files



Hi Raphael,

On 22 Oct, Raphael Hertzog wrote:
 > Le Fri, Oct 22, 1999 at 08:25:51PM +0200, Boris Erdmann écrivait:
 > > Dear gdm (gnome display manager) maintainer,
 > > 
 > > shouldn't the config files for gdm reside in
 > > /etc/X11/gdm instead of /etc/gdm ?
 > 
 > Well there's already a wishlist bug report about this. The file are
 > automatically installed in <sysconfdir>/gdm and I don't know
 > if something would break if I set <sysconfdir> to /etc/X11/
 > 
 > If I change this, the configuration file may be lost on upgrade, and
 > then I would have to handle the problem in the preinst/postinst, so
 > i've done nothing at the moment.
 > 
 > Anyway, if you think it's important, feel free to send me a patch
 > implementing this ...

I dealt with this problem when I moved Imlib's config directory from
`/etc/im' to `/etc/imlib'.  It caused problems for users who had a
symlink from /etc/imlib to /etc.  Presumably you shouldn't have
that problem.  Below is the preinst script I created for the imlib-base
package.  Please feel free to use it for gdm (modified for gdm, of
course).  If you decide to use it, please let me know if you come up
with any improvements.  Looking back it now, it looks like it can use
quite a few :-).  I never created a postinst script since I didn't 
think that I needed one. If you come up with one then I'd like to see it
in case I can use it for imlib-base, if that is alright with you.

HTH,
-Ossama


#!/bin/sh

set -e

case "$1" in
install) ;;
upgrade)
  # Move conffiles from old location to new location
  if test -f /etc/im/imrc && egrep 'Config file for Imlib' /etc/im/imrc 2>&1 > /dev/null; then
    echo -n "Moving existing Imlib configuration files to /etc/imlib ... "
    test -d /etc/imlib || (mkdir /etc/imlib; chmod 755 /etc/imlib)
    mv /etc/im/imrc /etc/imlib
    echo "done."

    test -f /etc/im/im_palette.pal && mv /etc/im/im_palette.pal /etc/imlib

    echo ""
    echo "********************************************************"
    echo "NOTE: The imlib system directory has been moved from"
    echo "      /etc/im to /etc/imlib."
    echo "      Any existing ~/.imrc files may need to be updated"
    echo "      to reflect the new location of the system palette"
    echo "      file now found in /etc/imlib."
    echo "      Read the file README.Debian in"
    echo "        /usr/share/doc/imlib-base"
    echo "      for more information."
    echo "********************************************************"
    echo ""
  else
    : # Do nothing
  fi

  exit
  ;;
abort-upgrade) ;;
*)
  echo "ERROR: unrecognized imlib-base preinst arguments: $@" 1>&2
  echo "       installation of imlib-base package aborted" 1>&2
  exit 1; # Failure
  ;;
esac



Reply to: