Sophie

Sophie

distrib > Fedora > 14 > i386 > media > os > by-pkgid > 2274e84188ad0e3532cc32e1ae37daf7 > scriptlet

gdm-2.32.0-1.fc14.i686.rpm

PREIN

/bin/sh

if [ "$1" -gt 1 ] ; then 
    rm -rf /var/lib/rpm-state/gconf/* 
    for schema in gdm-simple-greeter ; do 
        if test -f /etc/gconf/schemas/"$schema".schemas ; then 
            cp -p /etc/gconf/schemas/"$schema".schemas /var/lib/rpm-state/gconf/ || : 
        fi 
    done 
fi 
/usr/sbin/useradd -M -u 42 -d /var/lib/gdm -s /sbin/nologin -r gdm > /dev/null 2>&1
/usr/sbin/usermod -d /var/lib/gdm -s /sbin/nologin gdm >/dev/null 2>&1
# ignore errors, as we can't disambiguate between gdm already existed
# and couldn't create account with the current adduser.
exit 0

PREUN

/bin/sh

if [ "$1" -eq 0 ] ; then 
    for schema in gdm-simple-greeter ; do 
        
        if test -f /etc/gconf/schemas/"$schema".schemas ; then 
            export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` 
            gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : 
        fi 
    done 
fi

POSTIN

/bin/sh
/sbin/ldconfig

for schema in gdm-simple-greeter ; do 
    if test -f /var/lib/rpm-state/gconf/"$schema".schemas ; then 
        cmp --quiet /etc/gconf/schemas/"$schema".schemas /var/lib/rpm-state/gconf/"$schema".schemas 
        if test $? != 0; then
            
        if test -f /etc/gconf/schemas/"$schema".schemas ; then 
            export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` 
            gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : 
        fi 
            export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` 
            gconftool-2 --makefile-install-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : 
        fi 
        rm -f /var/lib/rpm-state/gconf/"$schema".schemas 
    else 
        export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` 
        gconftool-2 --makefile-install-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : 
    fi 
done 
touch --no-create /usr/share/icons/hicolor >&/dev/null || :

# if the user already has a config file, then migrate it to the new
# location; rpm will ensure that old file will be renamed

custom=/etc/gdm/custom.conf

if [ $1 -ge 2 ] ; then
    if [ -f /usr/share/gdm/config/gdm.conf-custom ]; then
        oldconffile=/usr/share/gdm/config/gdm.conf-custom
    elif [ -f /etc/X11/gdm/gdm.conf ]; then
        oldconffile=/etc/X11/gdm/gdm.conf
    fi

    # Comment out some entries from the custom config file that may
    # have changed locations in the update.  Also move various
    # elements to their new locations.

    [ -n "$oldconffile" ] && sed \
    -e 's@^command=/usr/X11R6/bin/X@#command=/usr/bin/Xorg@' \
    -e 's@^Xnest=/usr/X11R6/bin/Xnest@#Xnest=/usr/X11R6/bin/Xnest@' \
    -e 's@^BaseXsession=/etc/X11/xdm/Xsession@#BaseXsession=/etc/X11/xinit/Xsession@' \
    -e 's@^BaseXsession=/etc/X11/gdm/Xsession@#&@' \
    -e 's@^BaseXsession=/etc/gdm/Xsession@#&@' \
    -e 's@^Greeter=/usr/bin/gdmgreeter@#Greeter=/usr/libexec/gdmgreeter@' \
    -e 's@^RemoteGreeter=/usr/bin/gdmlogin@#RemoteGreeter=/usr/libexec/gdmlogin@' \
    -e 's@^GraphicalTheme=Bluecurve@#&@' \
    -e 's@^BackgroundColor=#20305a@#&@' \
    -e 's@^DefaultPath=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin@#&@' \
    -e 's@^RootPath=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin@#&@' \
    -e 's@^HostImageDir=/usr/share/hosts/@#HostImageDir=/usr/share/pixmaps/faces/@' \
    -e 's@^LogDir=/var/log/gdm@#&@' \
    -e 's@^PostLoginScriptDir=/etc/X11/gdm/PostLogin@#&@' \
    -e 's@^PreLoginScriptDir=/etc/X11/gdm/PreLogin@#&@' \
    -e 's@^PreSessionScriptDir=/etc/X11/gdm/PreSession@#&@' \
    -e 's@^PostSessionScriptDir=/etc/X11/gdm/PostSession@#&@' \
    -e 's@^DisplayInitDir=/var/run/gdm.pid@#&@' \
    -e 's@^RebootCommand=/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now;/usr/bin/reboot@#&@' \
    -e 's@^HaltCommand=/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now;/usr/bin/poweroff@#&@' \
    -e 's@^ServAuthDir=/var/gdm@#&@' \
    -e 's@^Greeter=/usr/bin/gdmlogin@Greeter=/usr/libexec/gdmlogin@' \
    -e 's@^RemoteGreeter=/usr/bin/gdmgreeter@RemoteGreeter=/usr/libexec/gdmgreeter@' \
    $oldconffile > $custom
fi

if [ $1 -ge 2 -a -f $custom ] && grep -q /etc/X11/gdm $custom ; then
   sed -i -e 's@/etc/X11/gdm@/etc/gdm@g' $custom
fi

POSTUN

/bin/sh
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  touch --no-create /usr/share/icons/hicolor >&/dev/null || :
  gtk-update-icon-cache /usr/share/icons/hicolor >&/dev/ull || :
fi

POSTTRANS

/bin/sh
gtk-update-icon-cache /usr/share/icons/hicolor >&/dev/ull || :