# pciutils 2.2.6
# ===============
# Slackware 8.1's 'pciutils' package includes version 2.1.10, 9.0's, 9.1's,
# 10.0's, 10.1's, and 10.2's include 2.1.11, 11.0's includes 2.2.3, and
# 12.0's includes 2.2.5
# If you have a pciutils that was installed into /usr/local, follow the
# uninstall instructions at the bottom before continuing below
cd
test -f installed/pciutils-2.2.6.tar.bz2 &&
mv installed/pciutils-2.2.6.tar.bz2 .
test ! -f pciutils-2.2.6.tar.bz2 &&
wget http://ftp.kernel.org/pub/software/utils/pciutils/\
pciutils-2.2.6.tar.bz2
# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "80643f3fb571b489fc9fda4faff03aee pciutils-2.2.6.tar.bz2" | md5sum -c
# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "95cb624280e737143f97c1d5e22f471f41b45222 pciutils-2.2.6.tar.bz2" | \
sha1sum -c
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "pciutils-*" -exec rm -r {} \;
tar xjvf ~/pciutils-2.2.6.tar.bz2
cd pciutils-2.2.6
test $UID = 0 && chown -R root:root .
# Update the update-pciids.sh script with a new URL to get
# the pci.ids file from, and a new location for the new one
cat update-pciids.sh | sed \
-e 's%SRC="http://pciids.sourceforge.net/v2.2/pci.ids"%\
SRC="http://pciids.sourceforge.net/pci.ids"%' \
-e 's%DEST=pci.ids%DEST=/usr/share/pci.ids%' > update-pciids.sh.new
test -s update-pciids.sh.new &&
( diff -q update-pciids.sh update-pciids.sh.new
test $? -eq 1 &&
( mv update-pciids.sh update-pciids.sh.old
mv update-pciids.sh.new update-pciids.sh ))
# Build the new version
make PREFIX=/usr SBINDIR=/sbin
# Become root to install it
su
test -x /sbin/removepkg && /sbin/removepkg pciutils
rm -f /usr/sbin/pcimodules /usr/man/man8/pcimodules.8
make install PREFIX=/usr SBINDIR=/sbin
# Create a monthly cron job to update /usr/share/pci.ids
# (you can also just run /sbin/update-pciids manually, but you'll
# probably never think of it again)
#
# If you have the /etc/cron.(hourly|daily|weekly|monthly) directories set
# up:
test -d /etc/cron.monthly &&
( cat << EOF > /etc/cron.monthly/pciutils
#!/bin/sh
/sbin/update-pciids > /dev/null 2>&1
if [ \$? != 0 ]; then
echo "Error running update-pciids"
exit 1
fi
EOF
chmod 700 /etc/cron.monthly/pciutils )
#
## If not, create a cron job like this to run it on the 15th of every month
## at 2:34am:
# 34 2 15 * * /sbin/update-pciids
# And run it manually now:
/sbin/update-pciids
# Become yourself again
exit
cd
rm -f installed/pciutils-*.tar.*
mv pciutils-2.2.6.tar.bz2 installed/