From: Chris Gianelloni Date: Wed, 14 Feb 2007 19:33:13 +0000 (+0000) Subject: Fix up the pci.ids/usb.ids code to work with newer pciutils and future-proof the... X-Git-Tag: CATALYST_2_0_6_916~276 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed0c816600236cb45c2cff2dcdc8211d8e795930;p=catalyst.git Fix up the pci.ids/usb.ids code to work with newer pciutils and future-proof the usbutils hanlding in case they follow suit with pciutils. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1218 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 9a3ad615..34d17808 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 14 Feb 2007; Chris Gianelloni + targets/support/livecdfs-update.sh: + Fix up the pci.ids/usb.ids code to work with newer pciutils and future-proof + the usbutils hanlding in case they follow suit with pciutils. + 13 Feb 2007; Chris Gianelloni arch/alpha.py, arch/amd64.py, arch/arm.py, arch/hppa.py, arch/ia64.py, arch/mips.py, arch/ppc.py, arch/ppc64.py, arch/s390.py, arch/sh.py, arch/sparc.py, diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index 7acfac19..6eea526c 100755 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -112,15 +112,28 @@ echo "alias ls='ls --color=auto'" >> /etc/profile echo "alias ll='ls -l'" >> /etc/profile echo "alias grep='grep --color=auto'" >> /etc/profile -# Make sure we have the latest pci,usb and hotplug ids +# Make sure we have the latest pci,usb and hotplug ids. Older versions of +# pciutils and usbutils used /sbin, where newer versions use /usr/sbin. [ -x /sbin/update-pciids ] && /sbin/update-pciids [ -x /sbin/update-usbids ] && /sbin/update-usbids +[ -x /usr/sbin/update-pciids ] && /usr/sbin/update-pciids +[ -x /usr/sbin/update-usbids ] && /usr/sbin/update-usbids if [ -d /usr/share/hwdata ] then - [ -f /usr/share/hwdata/pci.ids ] && rm -f /usr/share/hwdata/pci.ids - [ -f /usr/share/hwdata/usb.ids ] && rm -f /usr/share/hwdata/usb.ids - ln -s /usr/share/misc/pci.ids /usr/share/hwdata/pci.ids - ln -s /usr/share/misc/usb.ids /usr/share/hwdata/usb.ids + # If we have uncompressed pci and usb ids files, symlink them. + [ -f /usr/share/misc/pci.ids ] && [ -f /usr/share/hwdata/pci.ids ] && \ + rm -f /usr/share/hwdata/pci.ids && ln -s /usr/share/misc/pci.ids \ + /usr/share/hwdata/pci.ids + [ -f /usr/share/misc/usb.ids ] && [ -f /usr/share/hwdata/usb.ids ] && \ + rm -f /usr/share/hwdata/usb.ids && ln -s /usr/share/misc/usb.ids \ + /usr/share/hwdata/usb.ids + # If we have compressed pci and usb files, we download our own copies. + [ -f /usr/share/misc/pci.ids.gz ] && [ -f /usr/share/hwdata/pci.ids ] && \ + rm -f /usr/share/hwdata/pci.ids && wget -O /usr/share/hwdata/pci.ids \ + http://pciids.sourceforge.net/v2.2/pci.ids + [ -f /usr/share/misc/usb.ids.gz ] && [ -f /usr/share/hwdata/usb.ids ] && \ + rm -f /usr/share/hwdata/usb.ids && wget -O /usr/share/hwdata/usb.ids \ + http://www.linux-usb.org/usb.ids fi # Setup opengl in /etc (if configured)