Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > main > by-pkgid > 239efe4dd40b4ee8c1a126eda6973078 > scriptlet

glibc-2.3.4-8mdk.i586.rpm

PREIN

/sbin/sash
if [ ! -f /lib/libnss_files-2.3.4.so ]; then touch /lib/glibc.upgraded; fi

POSTIN

/bin/sh
if [[ "$1" = "2" ]]; then
grep -q "^include ld.so.conf.d/\*.conf" /etc/ld.so.conf || {
  echo "include ld.so.conf.d/*.conf" > /etc/ld.so.conf.new
  cat /etc/ld.so.conf >> /etc/ld.so.conf.new
  mv -f /etc/ld.so.conf.new /etc/ld.so.conf
}
fi
/sbin/ldconfig


if [ "$1" -ge 1 ]; then
  # On upgrade the services doesn't work because libnss couldn't be
  # loaded anymore.
    if [ -f /lib/glibc.upgraded ]; then
	# if X is running define the fontpath to something xfs-independent
	[[ -n "$DISPLAY" ]] && xset fp= /usr/X11R6/lib/X11/fonts/misc
	echo "Restarting all the services of this run level"
	/usr/sbin/glibc-post-upgrade
	# if X is running, reset the fontpath to its default value
	[[ -n "$DISPLAY" ]] && xset fp default        
    fi
    if [ -f /bin/rm ]; then
      for i in /lib/libnss_nis.so.1 /lib/libnss_files.so.1 /lib/libnss_dns.so.1 /lib/libnss_compat.so.1; do
        if [ -e $i ] && [ ! -L $i ]; then
          /bin/rm -f $i
	fi
      done
    fi
fi

[[ -x /bin/rm ]] && /bin/rm -f /lib/glibc.upgraded