PREIN
/bin/sh
/usr/share/rpm-helper/add-user gdm $1 gdm /var/lib/gdm /bin/false
/usr/share/rpm-helper/add-group gdm $1 xgrp gdm
POSTIN
/bin/sh
if [ -f //etc/X11/xdm/Xsession -a ! -x //etc/X11/xdm/Xsession ]; then
chmod +x //etc/X11/xdm/Xsession
fi
if [ -x /usr/sbin/fndSession ]; then /usr/sbin/fndSession || true ; fi
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
/sbin/ldconfig
if [ -x /usr/bin/scrollkeeper-update ]; then /usr/bin/scrollkeeper-update -q || true ; fi
# Attempt to restart GDM softly by use of the fifo. Wont work on older
# then 2.2.3.1 versions but should work nicely on later upgrades.
# FIXME: this is just way too complex
FIFOFILE=`grep '^ServAuthDir=' /etc/X11/gdm/gdm.conf | sed -e 's/^ServAuthDir=//'`
if test x$FIFOFILE = x ; then
FIFOFILE=/var/lib/gdm/.gdmfifo
else
FIFOFILE="$FIFOFILE"/.gdmfifo
fi
PIDFILE=`grep '^PidFile=' /etc/X11/gdm/gdm.conf | sed -e 's/^PidFile=//'`
if test x$PIDFILE = x ; then
PIDFILE=/var/run/gdm.pid
fi
if test -w $FIFOFILE ; then
if test -f $PIDFILE ; then
if kill -0 `cat $PIDFILE` ; then
(echo;echo SOFT_RESTART) >> $FIFOFILE
fi
fi
fi
# ignore error in the above
exit 0
POSTUN
/bin/sh
if [ -x /usr/sbin/fndSession ]; then /usr/sbin/fndSession || true ; fi
/usr/share/rpm-helper/del-user gdm $1 gdm
/usr/share/rpm-helper/del-group gdm $1 xgrp
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
/sbin/ldconfig
if [ -x /usr/bin/scrollkeeper-update ]; then /usr/bin/scrollkeeper-update -q || true ; fi