Sophie

Sophie

distrib > Mageia > 2 > i586 > media > core-updates > by-pkgid > b8acd4245928c2520509d722fddec279 > scriptlet

glibc-2.14.1-11.2.mga2.i586.rpm

PREIN

/bin/dash.static
# test(1) and echo(1) are built-ins
if [ -d /lib ] && [ ! -f /lib/libnss_files-2.14.1.so ]; then
  echo > /lib/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 /etc/ld.so.conf.d/*.conf" ] && keep=1
    # Remove previously used include line without absolute path
    [ "$i" = "include ld.so.conf.d/*.conf" ] || echo $i
  done < $ldso_conf > $ldso_conf-
  if [ -z "$keep" ]; then
    echo "include /etc/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 /lib/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 /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

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