[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script idea...



Ender Wigin wrote:
> 
> Hi,
> 
> I just (couple of weeks realy) upgraded to Hamm.
> After the upgrade I was left with a bunch of apps that core dumped ...(IE:
> ncftp) before I upgraded them to the libc6 version... So today in math
> class I thought up a neat script idea that could help others in my
> plight... (note extenuating curcumstances in my case) Basicly my idea is
> to run "ldd * | grep 'libc.so.5' | tail libc5apps" on the bin directorys
> ...now for the questions. one: I realy think that there is probaly a
> better way to do this ... (Ideas?) Two: I would like to somehow link this
> to the Contents file so that indivigual executibles are not listed as
> things to upgrade, but the packages ... IE step one get list of lib5 apps,
> two grep aginst contents to get a package name providing that app. only I
> don't know how to do step 2 execpt manualy ... any ideas here ... I figure
> one of you perl gurus would know how to do this ... ?
> 

Here is the script you are asking for.  It is a variation on the one I
posted before to find a.out binaries on an ELF system.

Behan

-- 
Behan Webster     mailto:behanw@verisim.com
+1-613-224-7547   http://www.verisim.com/


#!/bin/sh
#
# findlibc5 - Find libc5 executables on a Debian system
#
# Written by: Behan Webster <behanw@verisim.com>
#

FILE=$HOME/libc5.txt
DIRS="/ -xdev"

if [ $# -eq 1 ] ; then
    FILE=$1
elif [ $# -gt 1 ] ; then
    echo "Usage: `basename $0` [filename]"
    exit 1
fi

if [ -f $FILE ] ; then
    echo "Saving old $FILE files..."
    savelog -c 8 -m 644 $FILE >/dev/null
fi

echo "Putting list of a.out packages in $FILE..."

(
    for FILE in `nice -n +18 find $DIRS -type f -perm +111` ; do
        if [ `ldd $FILE | grep -c libc.so.5` -gt 0 ] ; then
            dpkg -S $FILE
        fi
    done
) 2>/dev/null | cut -d: -f1 | sort -u > $FILE

echo "Done."


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: