Hi! Steve M. Robbins schrieb: > About two years ago, Arthur Korn posted a nifty script "wnppalert" > > http://lists.debian.org/debian-devel/2001/debian-devel-200103/msg01386.html > Since I'm lazy, I thought I'd ask whether someone else has already > fixed up the script and could post it here for the benefit of all. Here's my current version of the script. Maybe I should wormify it to get as many DDs as possible to use it *eg*. ciao, 2ri -- Help securing email, spread GPG, clearsign all mail. http://www.gnupg.org . Vielleicht ist alles ganz anders...
#! /bin/sh -e # wnppalert -- check for orphaned or put up for adoption, installed packages # get a list of packages with bugnumbers. I tried with LDAP, but this is _much_ # faster INSTALLED=`mktemp ${TMPDIR:-/tmp}/wnppalert-installed.XXXXXX` WNPP=`mktemp ${TMPDIR:-/tmp}/wnppalert-wnpp.XXXXXX` WNPP_PACKAGES=`mktemp ${TMPDIR:-/tmp}/wnppalert-wnpp_packages.XXXXXX` wget -qO - http://www.debian.org/devel/wnpp/orphaned| \ egrep '^<li><a href="http://bugs.debian.org/'| \ sed 's/<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:]*\): \([^<]*\)<\/a>.*/O \1 \2 -- \3/'\ > $WNPP wget -qO - http://www.debian.org/devel/wnpp/rfa_bypackage| \ egrep '^<li><a href="http://bugs.debian.org/'| \ sed 's/<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:]*\): \([^<]*\)<\/a>.*/RFA \1 \2 -- \3/'\ >> $WNPP cut -f3 -d' ' $WNPP | sort > $WNPP_PACKAGES # A list of installed files. This shouldn't use /var/lib/dpkg/status directly, but speed ... grep -B1 'Status: install ok installed' /var/lib/dpkg/status| \ grep Package| \ cut -f2 -d' '| \ sort \ > $INSTALLED ( comm -12 $WNPP_PACKAGES $INSTALLED | xargs -i grep {} $WNPP echo echo "Yours obediently, $0" ) | mail -es "Packages installed on `hostname` appear on WNPP" root rm $WNPP $WNPP_PACKAGES $INSTALLED
Attachment:
pgpvT6QVCK_p_.pgp
Description: PGP signature