From f6f32a516ca0c34b8f700b48072cfee453d6caa9 Mon Sep 17 00:00:00 2001 From: rudson Date: Wed, 15 Nov 2006 21:05:25 +0000 Subject: movendo... git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@652 370017ae-e619-0410-ac65-c121f96126d4 --- libs/libsafe/doinst.sh | 57 -------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 libs/libsafe/doinst.sh (limited to 'libs/libsafe/doinst.sh') diff --git a/libs/libsafe/doinst.sh b/libs/libsafe/doinst.sh deleted file mode 100644 index 813767b3..00000000 --- a/libs/libsafe/doinst.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# libmove sourcelib targetlib -# -# This allows you to move a new shared library into place, -# even on a running system. -libmove() { - LIBSOURCE=$1 - LIBTARGET=$2 - LIBFOO="`dirname $LIBTARGET`/libfoo.so.0.0.0" - # link duplicate of target lib so we can safely copy over it: - if [ -r $LIBTARGET ]; then - cp -a $LIBTARGET $LIBFOO - if [ -x /sbin/ldconfig ]; then - ldconfig -l $LIBFOO 2> /dev/null - fi - fi - mv $LIBSOURCE $LIBTARGET - if [ -x /sbin/ldconfig ]; then - ldconfig -l $LIBTARGET 2> /dev/null - fi - rm -f $LIBFOO -} - -# Before using libmove, try to install everything we can: -( cd lib/incoming - for file in * ; do - if [ ! -r ../$file ]; then - cp -a $file .. - fi - done ) -# Prepare the library for use with ldconfig: -if [ -x sbin/ldconfig ]; then - chroot . /sbin/ldconfig -fi - -( cd lib/incoming - for file in * ; do - libmove $file ../$file - done ) -#### Now, get rid of the temporary directory: -rm -rf lib/incoming - -# add the library to /etc/ld.so.preload: -if fgrep libsafe.so.2 etc/ld.so.preload 1> /dev/null 2> /dev/null ; then - GOOD=we_found_it -else - echo "/lib/libsafe.so.2" >> etc/ld.so.preload -fi - -# Prepare the library for use with ldconfig: -if [ -x sbin/ldconfig ]; then - chroot . /sbin/ldconfig -else # In case there's no ldconfig, make the links manually: - ( cd lib ; rm -rf libsafe.so.2 ) - ( cd lib ; ln -sf libsafe.so.2.0.9 libsafe.so.2 ) -fi -- cgit v1.2.3