#!/bin/sh
cd lib
mv ld.so.incoming ld.so
if [ -x /sbin/ldconfig ]; then # update library links
  /sbin/ldconfig .
  if [ -x /bin/sln ]; then
    /bin/sln ld-linux.so.1.9.5 ld-linux.so.1
    /bin/sln libdl.so.1.9.5 libdl.so.1
  fi
else # no ldconfig, we must be running safely from the bootdisk
  ln -sf ld-linux.so.1.9.5 ld-linux.so.1
  ln -sf libdl.so.1.9.5 libdl.so.1
fi
cd ..
( cd lib ; rm -rf libdl.so )
( cd lib ; ln -sf libdl.so.1 libdl.so )
( cd lib ; rm -rf ld-linux.so )
( cd lib ; ln -sf ld-linux.so.1 ld-linux.so )
