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
PREUN
/bin/sh
if [ "$1" = "0" ]; then
rm -f /usr/share/gdm/themes/mdk > /dev/null
fi
POSTIN
/bin/sh
#needed to update old gdm without removing new theme
#is removed by triggerpostun
if [ "$1" = "2" -a ! -L /usr/share/gdm/themes/mdk ]; then
mv /usr/share/gdm/themes/mdk /usr/share/gdm/themes/mdk.to_remove
else
if [ ! -L /usr/share/gdm/themes/mdk ]; then
ln -s -f ../../mdk/dm /usr/share/gdm/themes/mdk
fi
fi
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/custom.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/custom.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 [ "$1" = "0" -a -x /usr/bin/scrollkeeper-update ];
then /usr/bin/scrollkeeper-update -q || true ; fi
Triggers
gdm <
2.8.0.0-2mdk
/bin/sh
if [ -d /usr/share/gdm/themes/mdk.to_remove ]; then
rm -fr /usr/share/gdm/themes/mdk.to_remove
ln -s -f ../../mdk/dm /usr/share/gdm/themes/mdk
fi
#replace changed paths in gdm.conf
sed -i -e "s^/usr/bin/\(gdm[^ \t]\+\)^/usr/lib64/\1^g" /etc/X11/gdm/gdm.conf