Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > db8e5f06f55d8c230ed9beb3fc9d4c5f > scriptlet

glibc-2.7-12mnb1.x86_64.rpm

PREIN

/bin/dash.static
# test(1) and echo(1) are built-ins
if [ -d /lib64 ] && [ ! -f /lib64/libnss_files-2.7.so ]; then
  echo > /lib64/glibc.upgraded
fi

POSTIN

/usr/sbin/glibc-post-wrapper
export LC_ALL=C

if [ "$1" -gt 1 ]; then
  # migrate /etc/ld.so.conf to include the new /etc/ld.so.conf.d/
  # without external commands but for removing the temporary file
  ldso_conf=/etc/ld.so.conf
  while read i; do
    [ "$i" = "include ld.so.conf.d/*.conf" ] && keep=1
    echo $i
  done < $ldso_conf > $ldso_conf-
  if [ -z "$keep" ]; then
    echo "include ld.so.conf.d/*.conf" > $ldso_conf
    while read i; do
      echo $i
    done < $ldso_conf- >> $ldso_conf
  fi
  [ -x /bin/rm ] && /bin/rm -f $ldso_conf-
fi
/sbin/ldconfig

if [ "$1" -gt 1 ]; then
  # On upgrade the services doesn't work because libnss couldn't be
  # loaded anymore.
  if [ -f /lib64/glibc.upgraded ]; then
    if /usr/bin/readlink /proc/1/exe >/dev/null && \
       /usr/bin/readlink /proc/1/root >/dev/null; then
       if [ -x /sbin/telinit -a -p /dev/initctl ]; then
         /sbin/telinit u
       fi
       if [ -x /etc/init.d/sshd -a \
            -x /usr/sbin/sshd -a \
            -x /bin/bash ]; then
         /etc/init.d/sshd condrestart
       fi
    fi
  fi
  if [ -f /bin/rm ]; then
    for i in /lib64/libnss_nis.so.1 /lib64/libnss_files.so.1 /lib64/libnss_dns.so.1 /lib64/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 /lib64/glibc.upgraded

# always generate the gconv-modules.cache
/usr/sbin/iconvconfig -o /usr/lib64/gconv/gconv-modules.cache --nostdlib /usr/lib64/gconv